WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How to show a post single post in page template

im trying to understand how to target a template for an individual post.

if i use the following hierarchy for my site,

homepage
services
    - track car
    - race car
    - road car
    - fast road
    - paddock services
about
contact

what i really want to do is create and style the template for the post i've created for "track car" which is a post belonging to category "services".

I've worked out that if i create category-services.php then i can style an overview page which covers all of the services on one page, but what template do i create if i want to style a page which will show the service requested.

what template will cover the following requests "somewebsite.com/services/track-car/" "somewebsite.com/services/race-car/"

share|improve this question

marked as duplicate by kaiser, toscho Aug 14 '12 at 9:29

This question was marked as an exact duplicate of an existing question.

    
i've just had it suggested to me to think of the services tree as the blog, which makes the categories a type of post. i guess then that i could use an if statement in the usual pages (index and archive.php?). is this the way forwards? – bytejunkie Jul 25 '12 at 9:19
    
See this Q/A. – kaiser Jul 25 '12 at 12:33
    
kaiser, that was exactly what i needed to read. if you want to re-add it as an answer i'll accept it. unless thats against the rules? – bytejunkie Jul 27 '12 at 9:00
    
n/p - I marked it as duplicate. :) – kaiser Jul 27 '12 at 10:15

I'm not sure if it can be done with posts, but if you're using pages, you can use a template called page-id.php where id is the page id of your track car page. The template hierarchy can help you.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.