• Resolved thefrugalwallet

    (@thefrugalwallet)


    I’m having trouble removing extra lines from my table of contents. When I add in [toc heading_levels=”2,4″] there’s a big gap between my H2 headings and my H4 headings. I’ve tried to remove and gap that may be there holding a place for H3 headings by using the ‘heading_levels’ part of the code. Is there something else that I’m missing to remove this space? I really like this plugin, but with this space included, I think it makes the TOC just look sloppy.

    Do you have any suggestions?

    Cheers,
    Mollie

Viewing 13 replies - 1 through 13 (of 13 total)
  • Steven

    (@shazahm1hotmailcom)

    @thefrugalwallet

    RE: in [toc heading_levels=”2,4″]

    The shortcode does not support any option so the heading_levels="2,4" will not have any effect as it will simply be ignored.

    RE: I’m having trouble removing extra lines from my table of contents.

    I suspect that the theme is applying styles to lists which is adding the space (margin and/or padding). You would need to share a link to the page with the issue in order to provide more specific info.

    Thread Starter thefrugalwallet

    (@thefrugalwallet)

    Thanks for the reply. I’ve removed the heading_levels shortcode since it’s doing nothing ??

    I haven’t published the page yet, so I’m not certain I’ll be able to share it with you for diagnostics. Shall I share once I publish?

    Steven

    (@shazahm1hotmailcom)

    @thefrugalwallet

    RE: Shall I share once I publish?

    Sure, if you wish.

    Thread Starter thefrugalwallet

    (@thefrugalwallet)

    Hi there,

    Here’s the post that contains the spaces in the TOC. Is this something you can help me fix?

    https://thefrugalwallet.com/things-to-do-in-san-diego-with-kids/

    Thanks!

    Steven

    (@shazahm1hotmailcom)

    @thefrugalwallet

    Can you please install the release candidate to see if the issue is resolved? Here is the download link:

    https://downloads.www.ads-software.com/plugin/easy-table-of-contents.2.0-rc1.zip

    Thread Starter thefrugalwallet

    (@thefrugalwallet)

    Thank you for the zip file. I’m not sure that I know what you mean by installing the release candidate. Can you provide me more information on that?

    Steven

    (@shazahm1hotmailcom)

    @thefrugalwallet

    Deactivate and delete the installed version of ezTOC then install the downloaded zip as a new plugin.

    Hope that helps!

    Thread Starter thefrugalwallet

    (@thefrugalwallet)

    Thanks for the additional information. I’ve deleted the prior version of ezTOC and installed the downloaded zip, but I still seem to have the same issue with extra spacing in the TOC.

    https://thefrugalwallet.com/things-to-do-in-san-diego-with-kids/?preview_id=255&preview_nonce=092c185e34&post_format=standard&_thumbnail_id=316&preview=true

    Any other thoughts?

    Steven

    (@shazahm1hotmailcom)

    @thefrugalwallet

    Please add the following the the theme’s custom CSS area:

    
    .post_content #ez-toc-container ul > li:before,
    .widget_area #ez-toc-container ul > li:before,
    aside #ez-toc-container ul > li:before,
    .post_content #ez-toc-container ul ul > li:before,
    .widget_area #ez-toc-container ul ul > li:before,
    aside #ez-toc-container ul ul > li:before {
    	content: '';
    	display: inline;
    }
    

    The gaps seem to being caused by a few styles being applied to lists by the theme. This should reset those, only, for the TOC list.

    Hope this helps, let me know.

    Thread Starter thefrugalwallet

    (@thefrugalwallet)

    Sorry to keep being a bother. When I copied that code in to my CSS for the theme it warned me with this:

    There are 26 errors which must be fixed before you can save.
    Update anyway, even though it might break your site?

    This gave me reason to pause. Do you think I should proceed despite the warning or are there truly errors in the code that warrant a second look?

    Let me know what you think.

    Cheers

    Steven

    (@shazahm1hotmailcom)

    @thefrugalwallet

    Make sure the CSS I gave your matches after your paste it. There are no errors in it.

    Thread Starter thefrugalwallet

    (@thefrugalwallet)

    That did work! I’m amazed.

    Just one more question now. The top portion of the table (under section “Books to read to your kids before you go”) in indented farther than the other subsections.

    https://thefrugalwallet.com/things-to-do-in-san-diego-with-kids/

    I tried changing the header size thinking the the books were a h6 and the other headers were h4, so maybe that was the issue, but it didn’t seem to help. Any thoughts on that?

    Steven

    (@shazahm1hotmailcom)

    @thefrugalwallet

    Yes, this is because the “Books to read to your kids before you go” heading is an h2 while the subheads are an h6. Changing them to an h3 would correct it. ezTOC probably should not do the extra indenting when heading levels are skipped, so I do consider that a bug which I’ll look into. BUT, the W3C guidance states that you should not skip heading levels. It probably is not best for SEO either.

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘How to remove blank line in TOC’ is closed to new replies.