Okay
  Public Ticket #2709070
Table of Contents
Closed

Comments

  •  6
    nuraugen started the conversation

    I installed a table of contents add-on (Table of Contents Plus) and noticed that it doesn't recognize the Laborators Headings block in WPBakery block builder as a heading when creating the table of contents.
    If I understood correctly, I could enter an id in the table of contents configuration/shortcode, but there is no way I can assign an id to the headings in Laborator, only class.

    Could you incorporate the possibility to assign ids in the headings in the content block or is there another way I could solve this?
    I also noticed that neither yoast nor MathRank recognize Laborators headings in their SEO text analysis tool, but thats probably not a thing that you can solve.
    Thank you.

  • [deleted] replied

    Hi nuraugen,

    Thank you for your suggestion, we have added element ID attribute for headings:

    medium
    (view large image)

    To have this in your site please replace 2 files (until we release new update):
    1. Download this file and replace it in this directory (of the theme): /kalium/vc_templates/

    2. Download this file and replace it in this directory (of the theme): /kalium/includes/libraries/vc/lab_heading/

    As for the headings that are not recognized by RankMath nor Yoast I want to know if we can fix this, just tell me what do they require to support headings.

  •  6
    nuraugen replied

    Thanks Arlind! This is pretty awesome!
    I'm trying to find out how to support headings in RankMath and will let you know what I find out.

  •  6
    nuraugen replied

    Arlind,
    the folks over at RankMath just posted this reply regarding my question about headings:
    https://support.rankmath.com/ticket/kalium-theme-page-builder-heading-not-recognized-in-seo-analysis-for-score/#post-161462

    Hope this helps.

  • [deleted] replied

    Hi nuraugen,

    Thank you for going further into this issue. As I saw this issue is related to WPBakery which I am going to ask them to implement. I've also wrote a "patch" to include heading in the rank math title and description so you can copy this code and paste in functions.php:

    https://d.pr/n/Kjl4nJ

    This code is implemented as RankMath suggested so I hope it helps you with this.

  •  6
    nuraugen replied

    Thank you. I put your code in the "snippets" addon and activated it. Afterwards, I cleared autoptimize and w3 caches, but unfortunately it doesn't seem to work for me.
    I tried going into a paragraph of text in a text block from WPBakery within a post I made and manually put a h3 randomly within the text and RankMath recognized it.
    I also placed a completely "new" Heading block from the Laborator section of WPBakery and saved the published blog post, but RankMath still doesn't see it.
    Unsure if there is anything we can do about it.

  • [deleted] replied

    Hi nuraugen,

    I have slightly modified the code and recorded a video showing how it works:

    https://d.pr/v/TOzWzI

    The updated code snippet is here:

    https://d.pr/n/CfFqTw

    Does this work for you?

  •   nuraugen replied privately
  • [deleted] replied

    Hi nuraugen,

    I saw the video, but I think that the reason why RankMath shows this error is because:

    When using Laborator > Heading element it is appended in editor as:

    [lab_heading title="Some title"]Some description.[/lab_heading]
    
    And with text editor assigned as H2 is constructed as:

    <h2>Some title</h2>
    This way RankMath automatically reads H2 but unable to see that the "title" attribute of lab_heading as h2 element.

    In the preview of document it is interpreted correctly with <h2> tag as the shortcode is executed in frontend.

    Regarding this you can also ask RankMath support what you can do more because we already took all the suggested steps.