How to use apply filter
-
Hello,
Forgive what may be a dumb question, but Im a non-developer working on a non-profit charity website ??
I dont know where to paste the filter code to customize the Facebook image used. (code example below)
Does this go in og/og.php? or og/index.php ? If og.php, should it be pasted right before the closing tag:`}
new iWorks_Simple_Facebook_Open_Graph();`or somewhere else? Or, should this code snippet go in theme functions (functions.php)?
thank you!
Robertthe code I need to paste:
add_filter('og_image_init', 'my_og_image_init'); function my_og_image_init($images) { if ( is_front_page() || is_home() ) { $images[] = 'https://stopgarviespoint.com/wp-content/uploads/2016/03/GP-FB.jpg'; } return $images; }
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to use apply filter’ is closed to new replies.