Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1110520

    Hello,

    I have been searching for the answer to this, and came across this code:

    add_filter('avf_title_args', 'fix_single_post_title', 10, 2);
    function fix_single_post_title($args,$id)
    {
        if ( is_product() )
        {
            $args['heading'] = 'h1';
        }
    
        return $args;
    }

    If I remove the if statement, it works on blog posts, but no matter what it does not work on product pages. I need that title to be wrapped in an h1 tag.

    Thanks.

    #1110668

    Hey IdeaZone2550,
    For the standard product pages, the product title is in H1 tags, but when you create your own product page you will need to add each element. It sounds like you have added a title or you are referring to the top title bar:
    2019-06-15-085838
    Please link to your product page so we can take a closer look.

    Best regards,
    Mike

    #1111119

    Hi there, here is a link to a product using the ALB: https://ruffell-brown.com/product/hunter-douglas/

    As you can see, the title bar only contains a tag and not <h1>.

    Danielle

    #1111382

    Hi Danielle,

    This snippet does not apply in this case. You are building products with the Advanced Layout Builder and so you can add the h1 manually in the text block or the Special heading element.

    Best regards,
    Victoria

    #1111383

    Hi Danielle,

    This snippet does not apply in this case. You are building products with the Advanced Layout Builder and so you can add the h1 manually in the text block or the Special heading element.

    Best regards,
    Victoria

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