Forums

How add meta tag to a specific page in WordPress (2 posts)

  1. havefunforever
    Member
    Posted 7 months ago #

    I am having a WordPress blog at HaveFunForever and want to add a meta tag to a specific page. I don't want to use a plugin so can anyone tell me how to do it using PHP or something else.

  2. peredur
    Member
    Posted 7 months ago #

    How about creating a page template? Just copy the usual page.php into a new file mymeta-page.php or something and add the meta tag. Then for the page(s) you want to have that meta tag, just assign the template to them when you create/edit the page(s).

    See http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates for details.

    Or you can use the slug:

    http://codex.wordpress.org/Pages#Templates_by_page-ID_or_page-Slug

    This latter would probably be my preferred option.

    HTH

    PAE

Reply

You must log in to post.

About this Topic