WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Diference between page.php and single.php (4 posts)

  1. Theros
    Member
    Posted 7 years ago #

    Hi all, so I'm creating a new site with wordpress and I've run into a slight problem. There was some CSS code that I had to use for only the single post pages so I put that into the single.php page. However, now when I try to link to my other pages, like the About or archives page it uses the single.php file and so returns nothing... What can I use to make the Pages render using a different template?

  2. ninjaboy
    Member
    Posted 7 years ago #

    I had trouble with this when I first started with WP, but it's so easy once you understand the basic template selection hierarchy, which should get you started.

    http://codex.wordpress.org/Template_Hierarchy

    You can also create page templates, it's really very simple and useful.

    http://codex.wordpress.org/Pages#Creating_your_own_Page_Templates

    And finally once you have got all that working, you can start doing some really clever stuff with conditional tags

    http://codex.wordpress.org/Conditional_Tags

  3. Theros
    Member
    Posted 7 years ago #

    THANK YOU! I finally understand it now once you pointed out all the connections.

  4. ninjaboy
    Member
    Posted 7 years ago #

    No worries - t had me chasing my tail around for a while, but once you get a handle on it it's quite simple!

Topic Closed

This topic has been closed to new replies.

About this Topic