WordPress.org

Ready to get started?Download WordPress

Forums

Table of content
[resolved] TOC interacting with Simple Events Calendar plugin (7 posts)

  1. fredriley
    Blocked
    Posted 5 months ago #

    I've just noticed a side-effect of the TOC plugin - it affects the working of another plugin, the Simple Events Calendar, which I've had running successfully on my site for sometime. Usually, the events calendar displays a list of event titles as <h3>s, eg:

    <div class="vevent event-item odd event-1"><h3 class="summary">Education and Innovation Conference and Exhibition</h3><div class="description">blah, blah </div>

    With the TOC plugin enabled, these titles are preceded with numbers, eg:

    <div class="vevent event-item odd event-1"><h3 id="Education_and_Innovation_Conference_and_Exhibition">0.1. Education and Innovation Conference and Exhibition</h3><div class="description">blah, blah</div>

    This is definitely caused by the TOC plugin as it disappears if I de-activate TOC. The only shortcode in the page listing the events is:

    [events time=no]

    Is this something that you're aware of, and is there a fix, do you know?

    Fred

    https://wordpress.org/plugins/content-table/

  2. Sed Lex
    Member
    Plugin Author

    Posted 5 months ago #

    Yes indeed the TOC plugin interacts with the content of the page ...

    As I detect all title (h1, h2, h3, etc.) in the text and modify the content to add references (i.e. number such as "1.2", "Section 1", etc.) before (see the parameters page, your settings probably request to do this modification) and as the other plugin add some headers, my plugin will modify them accordingly.

    You may change your parameter to avoid adding reference before the header but it will be for all the page and for all headers...

    I do not believe that their is a way to avoid such behavior

    I could have done something if I handle all plugins in wordpress but this is not the case

  3. Sed Lex
    Member
    Plugin Author

    Posted 5 months ago #

    at the very very least, I could create an option to exclude header with some class such as "summary"

    Would you be happy with that ? ... (But it is dirty :( )

  4. Sed Lex
    Member
    Plugin Author

    Posted 5 months ago #

    Ok ... Actually, I did what you want: now you have an option at the end of the param tab to list the class you want to exclude

  5. Sed Lex
    Member
    Plugin Author

    Posted 5 months ago #

    And do not tell me that I am slow :) :) :) :)

    ==> version 1.4.7

  6. fredriley
    Blocked
    Posted 5 months ago #

    Merci beaucoup! Tu n'est pas lent, bien sûr :)

    For the sake of others reading this thread, you've solved the problem by introducing a check box in the plugin settings:

    "Modify the title even if the [toc] is not present in the article:"

    This is checked by default, and that will affect all site pages. It might be better to leave it unchecked by default, so that only pages with the [toc] shortcode will be affected.

    The option at the end of the settings to specify classes that will not be affected by the TOC plugin is useful.

    This is a very nice plugin :)

    Fred

  7. Sed Lex
    Member
    Plugin Author

    Posted 5 months ago #

    This is checked by default because it was the behavior at the very beginning of the plugin and this is not fair to change the behavior for the really first users of the plugin without asking them to choose

    That is why ... It is a natural way of coding new features / options : the behavior should remain the same

Reply

You must log in to post.

About this Plugin

About this Topic