Canonical does not work correctly
-
Men! We need your help!
The canonical is not displayed on section pages. For example, https://www.linevsystems.com/products/security-x-ray-screening/ The link is specified in the plugin https://prnt.sc/4_fLFTbGFDJe
A link from the product is pulled up to the subsection page https://www.linevsystems.com/products/medical-x-ray-imaging-therapy/breast-screening/
Only on the product page everything work fine https://www.linevsystems.com/products/medical-x-ray-imaging-therapy/breast-screening/mammoscan/
There is such code in the functions.php if remove it, nothing is displayed at all
// Yoast Canonical function addYoastCanonical(){ global $post; $meta = get_post_meta( $post->ID, '_yoast_wpseo_canonical', true ); if($meta){ echo '<link rel="canonical" href="' . $meta . '" />'; } } add_action( 'wp_head', 'addYoastCanonical');
Thank you for explaining!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Canonical does not work correctly’ is closed to new replies.