Wordpress php HREF to static template page

2 replies
How can I add a static php template page to a wordpress theme? The theme is a simple landingpage style theme and I want to add links to the menu that actually link to a .php file that I create and in that .php page I want to allow html to be added through the standard wordpress wysiwyg editor? This might not make sense but I'm having some difficulties. I understand creating a php file with the following code, but the theme doesn't pick up that code and allow me to select the .php page that I created. Please let me know if you can help. I can PM a link to check it out. Thanks everyone...
#href #page #php #static #template #wordpress
  • Profile picture of the author nelsonbiglar
    Originally Posted by nelsonbiglar View Post

    How can I add a static php template page to a wordpress theme? The theme is a simple landingpage style theme and I want to add links to the menu that actually link to a .php file that I create and in that .php page I want to allow html to be added through the standard wordpress wysiwyg editor? This might not make sense but I'm having some difficulties. I understand creating a php file with the following code, but the theme doesn't pick up that code and allow me to select the .php page that I created. Please let me know if you can help. I can PM a link to check it out. Thanks everyone...
    I've answered my own question though I think its the long way an maybe not the proper coded way of doing it!!! If you still want to help in any way, Im all game...
    Signature

    On the other side:
    www.fishingnorthernontario.com

    {{ DiscussionBoard.errors[3048866].message }}
  • Profile picture of the author Peterw
    You can use custom templates if you want!. This allows you to add pages through wordpress and use a template in your themes directory.

    Just take a php file like your themes page.php file, save it as a different name, edit it the way you want it to work/look [generally done inside your content divs] and add the following just below your opening php tag:


    Code:
    /*
    Template Name: Your Templates Name
    */

    Obviously edit where it says Your Template Name. You should then be able to add a page and select the template in the custom template dropdown menu.
    {{ DiscussionBoard.errors[3049062].message }}

Trending Topics