WordPress.org

Ready to get started?Download WordPress

Forums

Using different templates for different pages? (5 posts)

  1. shindig332
    Member
    Posted 5 years ago #

    Hey everyone

    I was wondering if somneone could tell me how i go about using different templates for different pages? For instance I have a layout for the home page, which lists the news items in four columes with a side bar, but when a user clicks on the news item i want the next page to go to a new layout, which is different to the homepage. But i am trying to figure out how i create a new template page for this, and then how i would go about styling it?

    Thanks for any help with this :)

    p.s I am running WordPress 2.7

  2. bradstinyworld
    Member
    Posted 5 years ago #

    It is easiest to base new templates of the single.php or page.php so that most of the elements are the same. To create new elements inside a template file you need to create style.css entries as you go along. If you want to see a theme with multiple templates try downloading this one http://bloggingfornoobs.com/wordpressthemes/black-white/ It has all extra files and templates included.

  3. shindig332
    Member
    Posted 5 years ago #

    Thanks for taking the time to reply bradstinyworld. So basically i can start to style the single.php or the page.php files? Once i have done that, how do i then tell the post pages to use that template?

    Thanks

  4. bradstinyworld
    Member
    Posted 5 years ago #

    make a copy of it and name it something else if you want it to be a template page.

  5. shindig332
    Member
    Posted 5 years ago #

    Thanks, and then where can i tell the news article to use that template? Do i have to select what tempalte i want each article to use after i have written it, or can i set a defualt?

    Also i have tried changing the font-weight and text shadows on my <p> tag, but it doesn't seem to effect it, do you know if there is a different selector that i have to use?

    Thanks for the help :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.