Update on this. I got the answer! I followed this simple code from
https://goran-s.in.rs/table-of-contents-wordpress-without-plugin/
It’s working fine!
Related Posts:
- How would one modify the filtering Gutenberg applies to pasted content?
- Gutenberg: Is there a way to know if current block is inside InnerBlocks?
- How to add a custom CSS class to core blocks in Gutenberg editor?
- How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table elements?
- Changing text within the Block Editor
- Remove left alignment option in core/image block
- Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies
- Filter Gutenberg Blocks Content
- How do I replace a render_callback function for a block?
- How can I filter block registration based on post-type? (Block alignment settings)
- Gutenberg disable the “block” tab in right sidebar
- How to change the order of HTML output of a core block?
- Gutenberg – Add align controls to a custom block
- Can the wordpress color palettes by changed through Javascript?
- Inline Styles on all native blocks
- How to link the whole list item in Gutenberg’s latest posts block?
- add_filter(allowed_block_types) -> adding core/paragraph bugs Gutenberg editor
- Set default terms for new posts / CPTs
- Detect when gutenberg editor title is available in Dom after editor load
- Gutenberg Block – Post Featured Image Filter Hook
- Set default value for “Additional CSS class(es)” for specific block types
- How to hide/remove GhostKit component panel in gutenberg block inspector
- Filter for author list in gutenberg core editor
- How to filter Sidebar Content
- Hook in a sidebar widget and add some markup
- How to optionally append components to the output of a gutenberg block?
- Problem width wp_insert_post_data and Gutenberg block editor
- Changing the category for existing Gutenberg blocks
- How do I check if I can use the allowed_block_types filter?
- How to add lazy field in content endpoint using Gutenberg blocks
- How can I add a prefix to titles displayed in sidebar using function.php?
- How do I add a class to all sidebars to let a Google Custom Search Engine know not to index the content?
- Loading a sidebar on an Ajax call
- How to add custom HTML attribute to reusable block div in WordPress admin
- How to change this WP logo and posts url in block editor?
- Are blocks that are converted to patterns no longer filterable through the_content?
- “Invalid parameter(s): attributes” issue in context of “blocks.registerBlockType” filter
- Add custom options to the wplink dialog
- How to show page content in feed?
- How can I add information underneath the user’s name on the users.php page?
- Is calling function_exists() faster or slower that apply_filters()
- Filtered query_vars becomes global. Why does this work?
- Alter only the page title, not the post titles within
- Load different template file when condition met?
- Too many actions/filters!
- How can override a add_filter of a plugin?
- Adding Filter Conditionally Per Page ID
- Nested calls the the_content filter
- How to change domain used when pinging sites
- Extend core block attributes in post content
- Is it possible to track down Actions and Filters?
- Adding id and class to the search input in WordPress search form
- Multiple filters for wp_get_archive
- Filter and modify entry-footer link in twentyseventeen
- Break out of wordpress filter
- Are there actions or filters I can use for Ajax calls?
- Add filter problems
- Where is the content cache when using apply_filters(‘the_content…?
- How to filter for user registration, be able to throw error message
- No ‘Access-Control-Allow-Origin’ header is present [closed]
- How to prepare WordPress Rest data for Preview Changes?
- How to validate recaptcha on comments form?
- Contact Form 7: Make field required after checkbox is checked
- Customize title, description and focused keyword [closed]
- Is there any filter to trigger as soon as media is uploaded to post or page?
- the_content filter together with require_once returns 1 instead of the content of the included file
- Missing Argument 2 for apply_filter
- How to get a single hook from wp_head()?
- WP filter to alter admin CSS styles?
- How to apply a filter to an ACF wysiwig editor field output?
- Is it possible to bind a function to a filter hook via Ajax?
- Filter Pages by Custom Field (ACF) in admin area
- Filter posts by meta data using custom query
- Remove tags without a specific meta key from “choose from the most used tags”
- Which Filter Do I Use To Modify The Subject Of The Retrieve Password Notification Email?
- Register users by e-mail
- automatic title through filter
- Filter causing loss of _wp_attachment_metadata
- Buddypress Filter Multiple Activities [closed]
- How to modify image caption in posts?
- Extend Nonce Lifetime for Specific Nonce Creation
- Consult array data in REST API Filter
- WordPress add_filter to post_date
- create a shortcode with acf including a filter
- Custom permalink for attachment
- Overriding Generated Attachment Post URL
- Pagination while keeping the filters
- Filter on the day of the week from timestamp
- using filters on the function from class
- Put data in my-account/view-order/id/ page
- add_filter not adding the filter
- Is this correct usage of filters in WordPress [closed]
- Passing variable from filter
- Filter posts by multiple checkbox categories
- Passing value from one hook to another
- posts_results filter – additional sort, with a meta value, to move posts to the end of the results, with pagination working
- How to use parse_query() to add an additional filter based on content to page search?
- FacetWP was unable to auto-detect the post listing : Having an issue with ACF load choices causing FacetWP error
- How could I create real-time filtering in this case?
- How to filter products by category in custom loop