Hot answers tagged

1

Thank you for your help, but something in that code broke the site (likely a small oversight by one of us). :) I did however find a solution on on a another board which works great and I'd like to share it here to help others. Credit goes to helgatheviking from WooCommerce Community on Slack. function insert_fb_in_head() { global $post; // If it is ...


1

You will need to use the methods on one of the WooCommerce product object for example: function insert_fb_in_head() { global $post; if ( !is_singular()) //if it is not a post or a page return; echo '<meta property="og:title" content="' . get_the_title() . '"/>'; echo '<meta property="og:type&...


Only top voted, non community-wiki answers of a minimum length are eligible