Yoast Metadata API to adjust/override the meta description

I think you’re on the right track here. You can use the wpseo_metadesc filter to alter the meta description any way you want. Check out below code, maybe it’ll help you with your function. add_filter( ‘wpseo_metadesc’, ‘my_custom_meta_description’ ); function my_custom_meta_description($description) { if ( !$description || empty($description) ) { global $post; $content = get_the_content($post->ID); if ( … Read more

How to use the Yoast SEO wpseo_canonical filter to set a canonical URL for /, /au/ & /uk/ sites in a MU environment

How would I use wpseo_canonical filter to set a canonical URL for the posts in www.example.com/uk/? E.g. the blog post www.example.com/uk/blog/post-1/ should have a canonical URL of www.example.com/blog/post-1/ I believe. I don’t know if that should be the canonical URL, but if you are asking how can that be done, then this would do it, … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)