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
Related Tags
gallery × 758images × 197
shortcode × 89
plugins × 61
attachments × 48
php × 36
custom-post-types × 32
theme-development × 32
media × 32
posts × 31
functions × 31
customization × 30
plugin-nextgen-gallery × 26
media-library × 24
filters × 23
jquery × 21
uploads × 21
block-editor × 21
post-thumbnails × 20
thumbnails × 19
captions × 18
loop × 17
plugin-development × 15
themes × 14
css × 12