[Resolved] Create Table of Content in the Sidebar

Home Forums Support [Resolved] Create Table of Content in the Sidebar

Home Forums Support Create Table of Content in the Sidebar

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2363910
    a1reno

    Hi,

    I’m using easy table of contents to put a table of contents into the sidebar on desktop. It appears to have worked, however, is there a way for the table of contents to appear at the top of the post for mobile and tablet? Since it’s a widget in the sidebar it appears at the bottom. Is there a way to do this? Or would I be better off creating a block?

    Would appreciate your advice on this.

    Thanks.

    #2364631
    Fernando
    Customer Support

    Hello there,

    Will your sidebar add also be appearing on mobile and tablet? If so, would it be okay to be placed on top as well on mobile and tablet?

    If so, can you try adding this CSS:

    @media (max-width: 1024px) {
        div#content {
            flex-direction: column-reverse
        }
    
        aside#ezw_tco-2 {
            padding: 0;
        }
    }

    Add this in Appearance > Customize > Additional CSS.

    #2364942
    a1reno

    Hi,

    Thank you for your help.

    My fault here, but I meant to say to put it under the title and featured image and start just before the content.

    What I’ve done instead is I’ve created a block with the table of contents shortcode. Is there now a way to remove the sidebar from mobile? This way I don’t have a TOC at the top and bottom on mobile view.

    #2365065
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    @media (max-width: 768px) {
        #right-sidebar {
           display: none;
        }
    }
    #2365083
    a1reno

    Worked perfectly. Thank you!

    #2365150
    David
    Staff
    Customer Support
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.