• Resolved Gemini23

    (@gemini23)


    How can I add a separate Title/H1 so that it is different to the Category name?
    ie – Category Name = “Green Apples”
    Category Title/H1 = “Where To Buy The Best green Apples”

Viewing 1 replies (of 1 total)
  • Saif

    (@babylon1999)

    Hello @gemini23,

    Thank you for reaching out!

    I understand you want to add a custom page title instead of the category title for category archive pages, correct?

    You can achieve this with the woocommerce_page_title filter. :?)
    For example:

    add_filter( 'woocommerce_page_title', 'custom_woocommerce_page_title', 10, 1 );
    function custom_woocommerce_page_title( $page_title) {
    
    
        // Custom title for the product category 'green-apples'
        if ( is_product_category('green-apples') ) {
            $page_title = 'Something else';
        }
        
        return $page_title;
    }
    

    If you have more than one category, you can keep adding if statements.

    if ( is_product_category('bananas') ) {
            $page_title = 'Something else';
        }

    If you require the assistance of a developer consider hiring a WooExpert as we’re not able to provide support for custom solutions per our support policy.

    Hope this helps! :?)

Viewing 1 replies (of 1 total)
  • The topic ‘Different category title to category name?’ is closed to new replies.