$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>filters - Removal of Jetpack OG Tags from old blog site|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

filters - Removal of Jetpack OG Tags from old blog site

matteradmin10PV0评论

www.beautifulcreationsphotography.co.uk

I have a client who used to have a Wordpress blog, however for some reason its carrying over to her new site and causing havok with Yoast.

Ive added in this filter below but it doesnt seem to have worked.

add_filter( 'jetpack_enable_open_graph', '__return_false' );

Any ideas?

www.beautifulcreationsphotography.co.uk

I have a client who used to have a Wordpress blog, however for some reason its carrying over to her new site and causing havok with Yoast.

Ive added in this filter below but it doesnt seem to have worked.

add_filter( 'jetpack_enable_open_graph', '__return_false' );

Any ideas?

Share Improve this question asked Jan 2, 2019 at 15:14 Kirsty MarksKirsty Marks 2571 gold badge3 silver badges13 bronze badges 2
  • What do you mean "a client who used to have a Wordpress blog"? – RiddleMeThis Commented Jan 2, 2019 at 15:27
  • Apologies, she basically had a .blog domain, and moved it to a .co.uk domain away from WP, so all of her items are still ranking with the old domain so I'm attempting to fix this :) – Kirsty Marks Commented Jan 2, 2019 at 15:44
Add a comment  | 

2 Answers 2

Reset to default 1

The site above does not use Jetpack's Open Graph Meta Tags. It uses Yoast SEO's own tags. In fact, on any site, if you use the Yoast SEO plugin and have activated the Open Graph meta tags under SEO > Social > Facebook, Jetpack's own Open Graph Meta Tags will never be added. Only the tags from Yoast will appear on your site. The 2 plugins are built to work well together, so you have no risk of having a duplicate set of tags if you use the 2 plugins together, and you do not need to add any code snippets.

That said, Facebook does cache information about each page on your site, so it is possible that even after you update Open Graph Meta Tags on a site, the old title / description / image is still used when sharing links on Facebook because you are seeing cached data. You can refresh that cache manually by using Facebook's Debug tool: https://developers.facebook/tools/debug/ You can click on "Scape again" there to refresh the data.

Make sure you are not seeing a cached version of the site.

Also, try adding priority to the filter like this.

add_filter( 'jetpack_enable_open_graph', '__return_false', 99 );

Try this version as well...

add_filter( 'jetpack_enable_opengraph', '__return_false', 99 );

Try switching temporarily switching themes and checking the source code.

Post a comment

comment list (0)

  1. No comments so far