Forums

[resolved] Add lines in the header with a plugin (2 posts)

  1. Mat_
    Member
    Posted 4 years ago #

    Hi,
    I'm working on a simple plugin, and i have some problem.

    I would like to apply my plugin changes (add some lines in the header) in only one page (with the X id by example).

    To do that, i'm using that:

    function addHeaderCode(){
    (my added code)}

    add_action('wp_head', 'addHeaderCode');

    I maybe have to add a if before the add_action and check the current page ? but how to check it ? With the page_link ?

    I'm lost, thx !!!

  2. Mat_
    Member
    Posted 4 years ago #

    I found how to.

    I had to use is_page() in my IF...

Topic Closed

This topic has been closed to new replies.

About this Topic