Add Filter at page/post
-
I need to control the og:image results on a page/post, there are other images so I don’t think I can use following, how would ‘if’ look if page/post is added to filter? so iow, page/post + og:image or any other og tag just for one page.
How to setup image on the front page? Use filter “og_image_init”: add_filter('og_og_image_value', 'my_og_og_image_value'); function my_og_og_image_value($images) { if ( empty($images) ) { $images[] = 'https://wordpress/wp-content/uploads/2014/11/DSCN0570.jpg'; } return $images; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Add Filter at page/post’ is closed to new replies.