Same Meta Title appearing on all webpages
-
I was trying to make this plugin SEO friendly for compare page.
For example. Meta Title shows Product A vs B when user compare two items or more.So I did add SEO meta tags in compare-page.php. It is working fine for all compare pages but same meta title appear on all webpages including homepage. And I don’t what is the reason.
Can anyone help me to fix it?
Here is what I added in the end of compare-page.php file:
<!doctype html> <html> <head> <?php $list = wccm_get_compare_list(); $seo_title = ''; foreach( $list as $pid ) { $seo_title = $seo_title . ' vs ' . get_the_title($pid); } $seo_title = substr($seo_title, 3); ?> <title><?php echo $seo_title; ?> | <?php bloginfo('name'); ?></title> </head> </html>
[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been damaged by the forum’s parser.]
https://www.ads-software.com/plugins/woocommerce-compare-list/
- The topic ‘Same Meta Title appearing on all webpages’ is closed to new replies.