RIch Pins Issue, please help

I do not know whether this is beyond the realm of your expertise, but I figured Id ask. Im having trouble getting validated for rich pins through pinterest because I believe something is off about my meta data. I have a resource that MIGHT solve the problem, BUT it requires editing the php files in my theme. I just made child theme, and honestly the last time I edited something in the php files, I couldn’t get back into my website for like 3 days lol. So before I do anything Id rather ask you guys your opinion, perhaps you have answer for me. plus i just read a recent post that you could only help out so much or cant really give advice. I have the code that pinterest provided which I know DOESNT WORK. was wondering if you might be able to fix the code at the very least so that it is compatible with x theme. please let me know… this is the php code. Thank You.

emphasized text

here is the link I got the info from

Hi there,

I checked the code and it seems that you used the x_enqueue_parent_stylesheet filter to add meta information which is wrong. That filter is only for the CSS assets. Your case is a simple HTML code which consists of meta tags to add to the HTML Head section.

Kindly change the code in the functions.php file to:

add_action('wp_head', 'head_information', 9999);

function head_information () { ?>
<!-- Your HTML Code Here -->
<?php }

wp_head is the correct action to use, and you need to replace <!-- Your HTML Code Here --> with the code Pinterest gave you.

That should do the trick. For more information about the actions and filters you can check this article:

https://theme.co/apex/forum/t/customizations-actions-and-filters-in-x/208

Hope it helps.

worked Great! Thank you so much

You’re welcome.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.