• Resolved flashpacker

    (@flashpacker)


    I’m following some tutorials about building my own theme
    but I intend to only have only pages, no posts or comments. My site will be about 15 pages. Which files will I need in my template? Can I leave out the comments file, post template etc. since I don’t want to use them and just make a template for pages?

    I currently have a static site that I built myself but I want to redo it in wordpress so I can have a feed and use some of the other plugins in my sidebars. (I know the pages aren’t normally included in a feed but from reading it seemed like I could set it up this way).

    Any advice?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • wpsensei

    (@wpsensei)

    If you intend on setting up your WordPress installation and using it for pages over posts, you need to at least have the following files in your theme folder:

    Files Needed

    ./style.css
    ./index.php
    ./page.php
    ./header.php
    ./footer.php
    ./screenshot.png

    Files Not Needed

    ./category.php **
    ./single.php
    ./archive.php
    ./archives.php
    ./comments.php
    ./comments-popup.php

    ** Generally not included with most WordPress themes. It controls the display of categories, if you wish to style them differently.

    The page.php file is what controls the display of each of your pages. The index.php file can be modified to suit to prevent the display of posts.

    Removal of Comments

    If you do not want the comments box to appear, simply remove the following line of code from your PHP file(s). Generally, this is only included in single.php on pre-made and default themes.

    <?php comments_template(); ?>

    Thread Starter flashpacker

    (@flashpacker)

    thanks sensei. That was a really useful answer.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘building own theme for only pages not posts or comments’ is closed to new replies.