Wordpress Page Template Help

by WillR
1 replies
Hi,

I have a wordpress theme installed on my blog. I want to create a new 'page' template that can be accessed from the 'page template' dropdown box in the wordpress dashboard.

I don't want this page to look at all like the rest of the theme. I have a totally different design for this page however I do want to include the standard wordpress comments section on this page - nothing else from wordpress.

Does anybody know what code I need to add to this page to:
a) have it recognized as a page template
b) have the comments section show on the page AND work

Any help appreciated.
#page #template #wordpress
  • Profile picture of the author iwantmore
    all you have to do is copy the original page template php file in the theme directory and rename it. (original file called : page.php)

    open the copy up and at the top you should see something like this


    /*
    template name: whatever
    */

    change this to whatever you want ot call the template, then save the file.

    this will get it show in the post area of your site (in the box just under the publish button.)

    now all you need to do is replace the markup of the page with your custom stuff.

    the comment stuff is a little trickier as i dont know how well your themes been coded.

    if its done correctly you should see somthing like this near the bottom of the file.

    <?php comment_form(); ?>

    this is what you need to keep.

    if it doesnt have this look for anything to do with comment.

    most tempaltes are commented and the div id are a dead giveaway most of the time.

    let us know how you get on.


    Originally Posted by WillR View Post

    Hi,

    I have a wordpress theme installed on my blog. I want to create a new 'page' template that can be accessed from the 'page template' dropdown box in the wordpress dashboard.

    I don't want this page to look at all like the rest of the theme. I have a totally different design for this page however I do want to include the standard wordpress comments section on this page - nothing else from wordpress.

    Does anybody know what code I need to add to this page to:
    a) have it recognized as a page template
    b) have the comments section show on the page AND work

    Any help appreciated.
    Signature
    No Half Pixels
    Creative Web Development and Design, NOT A FIXED PRICE SERVICE, if you want the best don't settle for an off the shelf solution.

    We provide cutting edge design, web development with WordPress, WHMCS, PHP, HTML, CSS, jQuery, and personalised hosting solutions to suit any needs.
    {{ DiscussionBoard.errors[2951707].message }}

Trending Topics