0

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/"

4
  • 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
    Commented Jul 25, 2012 at 9:19
  • See this Q/A.
    – kaiser
    Commented Jul 25, 2012 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
    Commented Jul 27, 2012 at 9:00
  • n/p - I marked it as duplicate. :)
    – kaiser
    Commented Jul 27, 2012 at 10:15

1 Answer 1

0

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.

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