• Resolved chcw

    (@chcw)


    Hi,

    Is it possible to insert HTML code to the header of a specific post?

    Currently if I choose to add a snippet, I can only add it before or after the post, not to the header.

    If I choose header & footer, it seems the HTML code will applied to all pages, not to a specfic post.

Viewing 1 replies (of 1 total)
  • Plugin Author Mircea Sandu

    (@gripgrip)

    Hi @chcw,

    Yes, you can use the Site Wide Header location, which translates to the <head> area.

    You can then use conditional logic to limit loading that snippet just to a specific post as outlined here: https://wpcode.com/how-to-add-scripts-to-specific-pages-in-wordpress/

    If you want to insert something inside your theme header, we don’t have a pre-built location for that as the structure varies for each theme but you can try using the Site Wide Body location.

Viewing 1 replies (of 1 total)

The topic ‘Insert HTML code to the header of a specific post?’ is closed to new replies.