Viewing 6 replies - 16 through 21 (of 21 total)
  • Plugin Author George Notaras

    (@gnotaras)

    The only change is i deleted is_front() || from your code. And it works.

    Not really sure if this is the solution…

    I’ll look into it again at some later time. Thanks for your feedback. This is the second time that I get a report about the schema.org generator breaking a theme.

    George

    Thread Starter Hasibul Kabir

    (@hkhasib)

    Sure. And thank you so much for great support. I really appreciate it. In fact, it is more than a premium support. And thank you again. ??

    Plugin Author George Notaras

    (@gnotaras)

    No matter how much I’d like to find a solution for this issue, it cannot be fixed by making any modifications to the HTML code the plugin generates, because there is no other way to automatically embed the schema.org microdata around the content than the one that is currently used.

    If your CSS tries to match the content’s div element using the element hierarchy instead of using the content’s div ID or class, then matching it would be impossible and thus no style could be applied, which would make the theme break.

    If the schema.org microdata generator is enabled and the layout is affected, it can only be fixed in the stylesheet by trying to match the content’s div element in a different way. For example, if the content is matched with something like this:

    .post .entry-content > p

    You should use the following instead:

    .post .entry-content p

    Matching the element path with syntax like body>...>div>div>p is not recommended.

    Alternatively, you could try to use the JSON+LD schema.org generator. The only known bugs so far are with WooCommerce products. If you use it, since the code is not mature enough, please feel free to report any issues you encounter.

    Kind Regards,
    George

    Thread Starter Hasibul Kabir

    (@hkhasib)

    Thank you George. If i face any issue in the future, I’ll inform you ??

    Plugin Author George Notaras

    (@gnotaras)

    Hello @hkhasib

    I just noticed a typo in the sample I had provided above. is_front should be is_front_page. I’m really sorry about this one. I hereby re-post the corrected code snippet:

    function amt_schemaorg_skip_front_page( $default ) {
        if ( is_front_page() || is_home() ) {
            return array();
        }
        return $default;
    }
    add_filter( 'amt_schemaorg_metadata_footer', 'amt_schemaorg_skip_front_page' );
    add_filter( 'amt_jsonld_schemaorg_metadata_head', 'amt_schemaorg_skip_front_page' );

    UPDATE: Further improved it so as to work correctly in case the JSON+LD schema.org generator is active.

    Kind Regards,
    George

    Thread Starter Hasibul Kabir

    (@hkhasib)

    Hi George,
    Thank you so much. I really appreciate it. ?? Thanks again.
    Regards
    Hasib

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘How to Remove Website Schema Markup’ is closed to new replies.