Forums

change the php? (5 posts)

  1. A2annie
    Member
    Posted 3 years ago #

    hi-

    I am having some issues with my own created templates working properly. (but am making headway)
    I've changed get_header() to get_header2()
    is that unacceptable? That file is uploaded too. header2.php I've now tried with get_header() and it works. The only difference between header.php and header2.php is the title. I want them to have unique titles

    again, I am not fluent in php, but do know my way around code html/css

    Anyway, it does seem to be working now with get_header(), but I am concerned about not being able to use get_header2()

    What is the best solution here? I am trying to pull up a different header file

  2. whooami
    Member
    Posted 3 years ago #

    I've changed get_header() to get_header2()

    thats not going to work. you cant just create calls to functions that arent defined.

    get_header actually does something -- it's a function, its defined.

    You can probably create you own function for that and put it inside your theme's functions.php - I say probably because Ive not done it.

    Short of that, there are examplesx of how to manipulate the title(s) in the codex and all these very forums.

  3. ronchicago
    Member
    Posted 3 years ago #

    the way i get various alternate files is with this command

    in place of...

    get_header()

    try this...

    <?php include (TEMPLATEPATH . '/header2.php'); ?>

    i have only done it on one theme and i don't know if this is a universal command or theme-specific. but try it ;-)

    i'd be interested to know if it works universally ;-)))

  4. iridiax
    Member
    Posted 3 years ago #

    Yes, I just use TEMPLATEPATH too.

    More info: http://codex.wordpress.org/Include_Tags

  5. A2annie
    Member
    Posted 3 years ago #

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.