i was wondering if you could help me : i would like to change the center of my page only with my posts : (all my posts will be in the same category) : how can i construct the page :

so : 1.my menu in header.php
2.a single post in the center of the page
3.and the bottom div in footer.php, which contains the menu for the posts

i'm wondering, if n°2 is "index.php", what page should i call? for example in twenty_ten, they call "content" in index.php :

<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content', get_post_format() ); ?>

how can i proceed, if i would like to click on n°3 menu, and have a new page with the post in the center of the page? Do you know what i mean?

Thanks if you can be of any help

1 Answer 1


In the Twenty Ten theme they are using a file called loop.php. It defines the loop for different page templates and defines theme accordingly inside loop.php. That's what allows them to use get_template_part.

Depending on your theme and how it's set up will determine how to go what your asking. If all of your pages or single posts will show only one post or one page's content you could use CSS to control the output so it was a centered block on the page when displayed.

If you wanted to use a centered single post template and normal layout on other pages, you could assign a custom class to the page you want centered by using an existing page template or by creating a custom template and assigning the pages to that template inside of the page editor.

There are several different options. If you have additional info I might be able to be more specific on "How To".

  • thanks, i forgot to come back on this post, the project was cancelled, but thanks anyway.Cheers
    – Paul
    Sep 23, 2011 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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