Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1461629

    Hello I was using Easy table of contents plugin, buy I have just realized that in the pages I have it the contact form is not working…..

    But I have seen that you have a widget for Table of contents….

    The think is that I need the table of contents :
    1) in all individual post blog (but at the beginning, so in mobile it can be seen easily
    2) and in all pages I have the [toc] shorcdode. (exmple https://faceclinic.es/clinica-capilar/injerto-capilar/)

    Is any way to use your “Table of contents”

    Thank you!

    #1461651

    Hey carmen,

    Thank you for the inquiry.

    If you want to add the theme’s Table of Contents (TOC) to your pages, you can use the Widget Area element from the Advance Layout Builder (ALB). Just create a custom widget area, add the TOC widget, edit a page, add the Widget Area element, and then select the custom widget area. Let us know if this helps.

    Best regards,
    Ismael

    #1461655

    Hello, I don’t really think this works to me.
    As I told you, I need table of contents in:

    1) POST: All post but at the beginning. If i put the widget area in the sidebar, in mobile appears at the end, not at the beginning.

    2) PAGES: I have more than 800 pages and probably more in the future. I can not have 800 widget areas!! and modify 800 pages…..

    Any other suggestion?

    Or do you know any plugin working well with enfold?

    Thank you!

    #1461658

    Hello I have use now “https://tocwp.com/docs/” Easy Table of Contents” – and as you can see here: https://faceclinic.es/clinica-capilar/injerto-capilar/ – in the pages “breaks” the columns….is there any way to fix that? I have also asked the plugin support…
    Thank you

    #1461660

    Hi,

    Thank you for the update.

    All post but at the beginning.

    You can create a custom shortcode for the TOC widget, then use a template hook to automatically render the TOC on every post. Please add this code to the functions.php file:

    add_shortcode('avs_toc', 'avs_toc_function');
    function avs_toc_function()
    {
        $args = array(
            'name' => 'Displayed Everywhere',
            'id' => 'av_everywhere',
            'description' => '',
            'class' => '',
            'before_widget' => '<section id="avia_auto_toc-2" class="widget clearfix avia_auto_toc">',
            'after_widget' => '<span class="seperator extralight-border"></span></section>',
            'before_title' => '',
            'after_title' => '',
            'widget_id' => 'avia_auto_toc_custom',
            'widget_name' => 'Enfold Child Table of Contents',
        );
    
        $instance = array(
            'title' => 'Toc',
            'exclude' => '',
            'style' => '',
            'level' => 'h1',
            'single_only' => 1,
            'indent' => 1,
            'smoothscroll' => 1,
        );
    
        ob_start();
        $toc = new \aviaFramework\widgets\avia_auto_toc;
        $toc->widget($args, $instance);
        $output = ob_get_clean();
    
        return $output;
    }

    Then include this hook to render the TOC after the main title:

    add_action('ava_after_main_title', function() {
        if(is_single()) echo do_shortcode('[avs_toc]');
    }, 10);
    

    Best regards,
    Ismael

    #1461661

    Hello again, I have found the “problem”, It seems that the issue with the columns (which I have on all pages) occurs when they are set to “Equal Height”. When I select “Equal Height” with alignment set to top, center, or bottom, the columns “break” and appear incorrectly on the computer. However, when they are set to “Individual Height”, they work and display correctly. I don’t know if this gives you any clues……
    The problem is that I need to have columns with equal height center, and also that I have this configuration in 800 pages!
    Thank you

    #1461662

    Thank you, but I’m not sure if I understand correctly. Do I need to go to each page and each blog post and add that code? That wouldn’t be feasible, as I have over 800 pages and almost 400 blog posts! I can’t do it manually on each page. It has to be something that works automatically.

    I need the table of contents to be inserted automatically in blog posts, and for pages, I want it to work with a shortcode like [toc] so I can place it wherever I want. Is that possible?

    #1461665

    Hi,

    I can’t do it manually on each page. It has to be something that works automatically.

    You just have to add the code to the functions.php file. The hook should automatically render the theme’s TOC widget shortcode in every post, after the main title, so you don’t have to add it manually. Let us know the result. Please contact the plugin developers (Easy Table of Contents) for more info about the column issue.

    Best regards,
    Ismael

    #1461668

    Thank you but I dont understand where I have to place this? wich title?

    Then include this hook to render the TOC after the main title:

    add_action(‘ava_after_main_title’, function() {
    if(is_single()) echo do_shortcode(‘[avs_toc]’);
    }, 10);
    ———–
    And what about the pages? it is enough having this: [toc] shortcode?
    Thank you!

    #1461746

    Hi,

    All of the code that we mentioned above should be added in the functions.php file. If you need to render the TOC on pages, remove this code:

    if(is_single()) 
    

    Let us know if this helps.

    Best regards,
    Ismael

    #1461829

    Hello it was not working well, finally I use this plugin “TOP Table Of Contents” and seems it is working fine.
    Thank you anyway!

    #1461837

    Hi,

    Thanks for the update, we’ll close this thread for now then. Please open a new thread if you should have any further questions or problems.

    Best regards,
    Rikard

Viewing 12 posts - 1 through 12 (of 12 total)
  • The topic ‘Table of content’ is closed to new replies.