I need to add a tracking pixel for a Facebook ad to my WordPress site. It should only be active for one blog post, not for every page on the site.
How can I get the script into the HEAD section for the specific post only?
I need to add a tracking pixel for a Facebook ad to my WordPress site. It should only be active for one blog post, not for every page on the site.
How can I get the script into the HEAD section for the specific post only?
You must be logged in to post a comment.
You can use the wordpress Conditional Tags
You can add something like this to your functions.php file:
There are a number of different conditional tags you can use. And your-post-slug can be substituted with the post id as well.