• I am curious to if it is possible somehow to add new PHP files to the template directory and allow them to access the stored values and functions that are already in wordpress.

    For example, I added a contact.php and biography.php to my current theme’s directory. They show up in dashboard when I log in and view the current theme I made, however, using functions like the_category(), single_cat_title(), the_content(), etc will result in an error.

    My main concern is that I want to add a search bar to every new custom page I create. In my contact.php, I added the same code used to add a search bar to my main index page. I use the following code and get the following error.

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

    Fatal error: Call to undefined function bloginfo() in themediawiz.com/html/wordpress/wp-content/themes/tmw/searchform.php on line 1

    That is the right directory for the file, however, like I said, the new php file can’t read any of the previous functions created. Can anyone tell me what files I need to include in order to make these functions work correctly?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Can anyone tell me what files I need to include in order to make these functions work correctly?

    wp-blog-header.php

    Thread Starter wiziology

    (@wiziology)

    works great! thanks for the help!

    +5

    Hello every one.

    I have a wp website working on http://www.bukavuonline.org
    I also made a gallery on http://www.bukavuonline.org/wp-gallery2.php , the wpg2 is properly working.

    The problem I have is that I cannot put “Gallery” menu in the menus bar, I am trying to figure out what to edit in header.php but I don’t know what to change and how.

    Can you help me please,,

    Thank you

    You have to hardcode the link in. wp-gallery2.php doesn’t physically load Gallery2 into WordPress other than for user tables and the ability to pull pics into WP.

    Thank you for the reply but You are using difficult technical words that I don’t understand, I am not good in websites.

    Can you please use simple terms…
    to hardcore…
    the link in…

    I appreciate and thanx for the reply

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding new PHP pages to a template’ is closed to new replies.