Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1404433

    We’re using the product-category description-textfield which Enfold is displaying as a headline (H1) in frontend.
    Problem is, that it’s nesting a P tag inside, so SEO tools are complaining about.
    How can this be removed?

    #1404509

    Hi boehmmedia,

    I can’t seem to reproduce the same issue.
    Can you give us a link to your product category page? so we can inspect it.
    You can post it in private content.

    Best regards,
    Nikko

    #1404521

    sure, there you go.
    ps: there is no paragraph or whatsoever tag in the editor (clear text).

    #1404603

    Hi,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function remove_product_category_description_paragraph_tag() { ?>
      <script>
    window.addEventListener('DOMContentLoaded', function() {
    (function($){
      $('#av_product_description h1 p').contents().unwrap();
    })(jQuery);
    });
    </script>
      <?php
    }
    add_action('wp_footer', 'remove_product_category_description_paragraph_tag');
    

    Then clear your browser cache and any cache plugin, and check.
    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.

    Best regards,
    Mike

    #1404646

    Hello Mike
    your javascript works, thanks!
    But why is the P tag added at all?

    #1404803

    Hi,
    Glad to hear this helped, I’m not sure why this is but I have asked the Dev Team to review and I will write back when I hear from them.
    Thank you for your patience and using Enfold.

    Best regards,
    Mike

    #1404969

    Hi,
    Thank you for your patience, the Dev Team found that the p tag was added by WordPress from the wpautop function due to the textarea field used in the theme option. They have added a filter to correct in the next update avf_wc_parallax_banner_tag
    So after the next update you can remove the solution posted above.
    Unless there is anything else we can assist with on this issue, shall we close this then?

    Best regards,
    Mike

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.