• Resolved yogesh_gamer

    (@yogesh_gamer)


    I’m trying to change the title of “compare page” manually. Whenever fetch the data from sql I’m calling a function which sets the title, description and keywords. Desc and keywords are working fine. But I can’t set the title.
    Here is code:

    function headeryo()
    {
    ?>
    <!doctype html>
    <html>
    <head>
    
    <title>XYZ</title>
    <meta name="keywords" content="key"/>
    <meta name="description" content="desc" />
    </head>
    </html>
    <?php
    }

    And I can’t use any SEO plugin for this purpose because this page is dynamic. Since it compare two or more products.

    But when I do try to add this HTML code at the bottom of PHP it is working fine but then it changes the meta data of all pages because this “Compare List” plugin was so designed that it load files at the beginning of loading any webpage so I did make a function and calling it where it is rendering comparing.

    Please help me

    https://wordpress.org/plugins/woocommerce-compare-list/

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to change a page's Meta Title?’ is closed to new replies.