timotime
Forum Replies Created
-
I have received an answer, but I haven’t implemented it yet:
The only way to set the filtered pages as no index no follow could be with the following code snippet
if( ! function_exists( 'yith_wcan_robots' ) ){
function yith_wcan_robots( $robots ){
if( ! empty( $_GET['yith_wcan'] ) ){
$robots['index'] = 'noindex';
$robots['follow'] = 'nofollow';
}
return $robots;
}
add_filter( 'rank_math/frontend/robots', 'yith_wcan_robots' );
}This code will check if the page is a filtered page checking the parameter in the url and it will show the noindex nofollow in the pages.
About your questions:Why the “noindex”, “nofollow” settings in the YITH plugin are not being applied.
This is because rank math doesn’t use the default WordPress and WooCommerce filters and for this reason it’s necesary to use the above code for filter the frontend and add the noindex and nofollow if the url include the yith_wcan parameter.
How to specifically set only the YITH filter pages to “noindex” in Rank Math without impacting the Canonical URLs.
Unfortunately, this is a question you should ask to the Rank math developers. We don’t have control on their settings and they can repply you in a better way.
Would adding Disallow: /*?yith_wcan=* to the robots.txt be a good alternative solution?
It could be a good alternative solution if you can prevent it from the robots.txt.
I hope it helps you.
Have a good day,
XYZ.Forum: Plugins
In reply to: [Download Manager] Only basic settings?Great! That′s it.
Thank you =)Forum: Plugins
In reply to: [Contact Form 7] CF7 Event-Tracking Google AnalyticsThank you so much! You gave me the necessary hint:
wp_footer and wp_header have not been implemented in the theme. Now it works. Thank you so much!