Moderator
Jan Dembowski
(@jdembowski)
Forum Moderator and Brute Squad
Moved to Fixing WordPress, this is not a Developing with WordPress topic.
Thank you Prashant!
Yes, i do use Yoast. What i would like to know is, if there a way we can do it such that – if we change on the main page it will change the canonical link in all other posts and pages as we have many posts and do not want to do it individually on each post. Is this possible?
Also I do not see the option on changing the canonical ref on main page, i see it for all the posts. Could you please tell me why is it?
If I change the canonical url in all my posts, does it automatically change the canonical url to be https in the main page too?
Appreciate your help!
Thanks!
Hello there
Can anyone please help me out with my request please
Thanks
Yes, I am here to help you 🙂
Please check this thread https://wordpress.org/support/topic/change-canonical-in-main-page/
You can always search your issues in this forum and may be you can find them yourself as well.
Thanks
Thanks, I had gone through this. I’m using Zerif pro theme and i do not see the frontend/class-frontend.php section to change the wpseo_canonical filter. Can you please tell me where to look for this section?
Hi Prashant
I was able to find the frontend/class-frontend.php under plug in section. Under this section can you please tell me where do i need to add the https canonical url.
Thanks in advance
add_filter('wpseo_canonical' , 'ps_change_cannonical', 10,1):
function ps_change_cannonical($url){
$url = 'https://monetago.com/';
return $url;
}
Hi, please try the above code. Paste it in your child theme’s functions.php file.
Thanks
This is my site Vietnamvisa.com. I want to know What is best canonical in this 2 options: