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

How do I change the formatting on http://wordpress.barrycarter.info/index.php/voronoi-temperature-map/ so that (for example) the map's nearly flush with the bottom of the menubar?

I don't want to edit page.php, since that'll change all pages, not just this one.

share|improve this question
up vote 3 down vote accepted

After creating the specific CSS you need to format the page how you like, you could:

  1. Create a custom page template with the CSS and assign the template this page.
  2. Create a page-{slug}.php file with the CSS, where {slug} is the page slug for this page (most likely the filename should be page-voronoi-temperature-map.php).
  3. Create a page-{ID}.php file, where if the page ID is 6, WordPress will look to use page-6.php.

These three options were mentioned in the Codex, under Template Hierarchy. By using any of these 3 options, you can alter the layout for this page without affecting all the rest of your pages.

share|improve this answer
Thanks! page.php itself says "If you want to overload this in a child theme then include a file called loop-page.php and that will be used instead.", but that didn't seem right, since loop-page.php displays all posts, and not a single page. – barrycarter May 21 '11 at 11:35

If you look at the page source, you'll see that <body> has been given a class page-id-1199. You can use that in your stylesheet to specify styles for that page alone.

.page-id-1199 #map { /* custom styles */ }
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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