It could be that there are duplicate Open Graph meta tags being generated AFTER your special hook. Priority would be given to the later tags, which means your customizations don’t happen.
Try setting the order of your hook later, so that it happens after whatever else might be generated:
// default is 10; I'm using 11 arbitrarily
add_action( 'wp_head', 'insert_fb_in_head', 11 );
More importantly, though, you need to confirm nothing else is generating OG. Check your plugins, and consider using on that easily lets you customize OG data as you need, like Complete Open Graph:
Related Posts:
- Conditionally add apt. Open Graph meta data to different pages on WordPress site
- Facebook meta tags not working properly on WordPress Site
- Open graph issue on my theme
- Facebook comments box on front page
- How to get user-meta from Social Login registered users?
- Installing Facebook comment plug in without loosing all previous wordpress comments?
- Top 3 posts in last week ordered by Facebook and Twitter share counts
- Facebook Like Button On Individual Comments
- Is it possible to integrate WordPress *posts* and social media (Facebook, Google+, Twitter)? [closed]
- Allow Facebook to preview posts before published
- Shortcode in AJAX popup
- Are there any plugins yet that support Facebook Like, Google +1 and allow Social Interaction tracking on Google Analytics
- WordPress Social Login > Post to a users Facebook wall
- Facebook plugin shows existing comments
- Facebook Like needs confirmation?
- Is there a way to share your Facebook Page’s stream on a WordPress page or post?
- What is generating my meta og:description?
- Updating the Drag-To-Share eXtended share URLs?
- Integrate BuddyPress & Facebook
- Facebook-like Notification Plugin for WordPress Community Blog Sites?
- Want to take Facebook Page posts and turn them into blog post
- Set plugin-values when creating post via REST-API
- Restrict access to content in conjunction with facebook connect & google login
- Integrate Facebook comments with native comments
- How do post a Photo to Facebook when a post is published? [closed]
- How to add FB like + share AND also other Social Buttons on ALL pages and posts?
- Is there a social members only login plugin for WordPress? [closed]
- Posting from WordPress to Facebook [closed]
- How to grab facebook page feed?
- Socialite WP plugin, unable to obtain API keys from FB
- Where is this strange og:description coming from?
- Shortcode does not expand in Facebook like
- how do i change my website facebook login button to another text immediately user login? [closed]
- HTTPS connection with wampserver for “Facebook for WordPress” plugin
- Error: Can´t access facebook comment plugin admin page
- Facebook ‘Share’ and ‘Like’ on individual posts
- Facebook and Twitter share buttons not working [closed]
- Change the Simple Facebook Connect popup position
- Publishing a video from blog to youtube
- How to get Facebook comment plugin in blog? [closed]
- Displaying the facebook profile picture in the WP-FB AutoConnect widget?
- Allow webp use on website but disallow webp as featured image during post creation
- How to stop Facebook mobile in-app browser cache on WordPress
- Facebook sharing image error with facebook debug
- Facebook Quote Plugin for Blockquote?
- How to display the Facebook like count in WordPress theme [closed]
- Plugin, add opengraph tags after form submit
- How to display single arbitrary facebook post with a shortcode?
- Plugin used only on some pages – not widget
- Facebook Feed Grabber Cache Relative to Dev Machine, not Server Install
- Remove ‘Publish to Facebook’ checkbox for Facebook page publish plugin
- Facebook Like Button with NextGen Gallery
- Overriding FB Auto Connect plugin function displayed in footer
- wp_update_post call really slow when official Facebook plugin is installed
- Publishing videos and images from blog to facebook
- Display Facebook photo albums and photo comments?
- Make a magic tag work with Custom Post Types
- Facebook like plugin with Multi Option-Needed [closed]
- Looking for Plugin that displays Facebook group’s photos [closed]
- Facebook comment into my blog
- Serious social interaction [closed]
- True or False: Is an Apache error or PHP error the same as a WordPress error?
- Publish post facebook page & twitter automatically [closed]
- WORDPRESS ,Can’t load image of post when sharing post via facebook [closed]
- Can WordPress updates take down site functions?
- How to get custom setting from get_option and pass it in getEntityRecords in gutenberg block?
- WooCommerce REST API aborts connection [closed]
- Footer option is missing in Customiser
- How to write a plugin that “listens” every time, an edit occurs?
- Buffered output in chunks and shortcode – how do I achieve that?
- Learn from Other site [closed]
- YOAST slug does not take the custom permalink I have made
- Why wordpress site is hitting itself
- Plugin Icon does not work correctly
- How to customized post slider layout in elementor wordpress [closed]
- Transfer wordpress comments form on another post [closed]
- Product customizing quiz – quiz adding products to the cart
- Achieve the following layout
- I want create woocommerec match products columns
- How to be Variables and options must be escaped when echo’d?
- WordPress Convert queries to slashes using function.php
- I’m getting the following error: Fatal error: Uncaught Error: Call to undefined function oil_paint_regeneration() [closed]
- Redirect a specific User role not admins automatically to view the post that they just updated
- jet engine listing for every single taxonomy in post type [closed]
- Selectively override Easy Digital Downloads protection via filter
- How to check record is exist or not in WordPress CRUD Operation with $wpdb
- Upload the images folder with sub-folders directly to server
- How to change all the urls of the WordPress site?
- Remove embed url for internal links
- Rewrite Rule in htaccess convert query string into slashes
- Change email notification language based on the site language in WPForms
- Limit entry to a WordPress page
- How to export post tags from wordpress
- 404 Error on a WordPress Website, Error disappears for a while and again appears
- Running a function using Crown WordPress on one day a week, for example, Mondays of every week
- Plugin_Upgrader not working if function is called from remote server
- Sort posts by Date (DESC) and by ACF: active_inactive (ASC)
- ShipStation WooCommerce Integration error
- Show WooCommerce products based on query parameters on redirect
- Ad Management Plug that can be used on a membership site