• Resolved Rookie

    (@alriksson)


    Having problem the headlines doesnt get any # added to the ID on them. Using oxygen builder any idea? Content is fetched via php the_content so should be working just fine?

    • This topic was modified 1 year, 1 month ago by Rookie.
Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author WPJoli

    (@wpjoli)

    Not sure how the builder is affecting the IDs to the headings.

    Maybe something else overrides the IDs. If you are using other plugins, maybe try deactivating them and see how it goes.

    Also, you can try increasing the priority of Joli TOC’s joli_toc_the_content_filter_priority filter like so:

    https://wpjoli.com/docs/joli-table-of-contents/developer-hooks/filters/joli_toc_the_content_filter_priority/

    Thread Starter Rookie

    (@alriksson)

    It used to work good back in the days. But updated to new and v2.

    Tried with the joli_toc_the_content_filter_priority without success not working. Custom solutions and code like this work but need to filter out emojis as well. But strange to me, Joli doesn’t work at all.

    https://gist.github.com/JeroenSormani/9e5e4215e6fd8ab281c9#file-wordpress-automatically-add-ids-php

    Plugin Author WPJoli

    (@wpjoli)

    It is likely that you have something in between that strips the IDs for some reason.

    I’m not sure if this has to do with the Oxygen builder but I need to perform some tests with it.

    To be sure, try deactivating all of your plugins except Joli TOC and see if you get the IDs or not.

    Also if you want to debug, you can try this filter and see what comes out (it will show raw data on your front end):

    add_filter('joli_toc_headings', 'filter_headings', 10, 2);
    
    // Dumps the headings
    function filter_headings( $headings ){ 
        var_dump($headings);
    
        return $headings;
    }

    Each item should have an id if it has been correctly processed. If not then something strange is going on.

    And if it does have an id but it is not showing inside the <H2/3/4/5/6> tags in the final output then something inteferes in the process.

    Plugin Author WPJoli

    (@wpjoli)

    This topic will be marked as resolved

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘No hash ID added to headlines’ is closed to new replies.