set default og:description for post
-
Hi,
first of all let me thank you for developing this great plugin.
i want to set a default og:description so it will be used when no content is found (for meta descriptin template i use post_excerpt. some of my posts have just a download links which are managed by another plugin thats why seopress detect them as empty excerpt and dont incldude og:description meta tag.
i found a solution using seopress_social_og_desc filter and its working good for me.
here is my codefunction sp_social_og_desc($html) { if(seopress_titles_the_description_content() ==''){ $html = '<meta property="og:description" content="my default description" />'; } return $html; } add_filter('seopress_social_og_desc', 'sp_social_og_desc');i just want to know is this good? do you have any suggestion?
Thank you
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘set default og:description for post’ is closed to new replies.