WordPress.org

Ready to get started?Download WordPress

Forums

Change template on main page of posts (5 posts)

  1. tpdlondon
    Member
    Posted 2 years ago #

    Hi,

    According to the following url we can change the template of individual posts.
    http://wordpress.org/extend/plugins/custom-post-template/

    How to change or select a template for the posts main page. When I click on June 2012 in the left navigation bar I go to a page where all my June posts are listed but that page has a different template to my website and I want to change it.

    Many thanks,
    Roohullah

  2. Digital Raindrops
    Member
    Posted 2 years ago #

    Hi,
    It the themes folder you could have a file date.php or archive.php, this is the template that displays the posts when you click on 'June 2012'

    For more information on the template heirarchy Date Display, look at the fallback date.php, archive.php then the index.php.

    HTH

    David

  3. tpdlondon
    Member
    Posted 2 years ago #

    I used Twenty Eleven as a base theme and there is no date.php file, whoever I did my changes in archive.php and it didn't work.

    Thanks,
    Roohullah

  4. tpdlondon
    Member
    Posted 2 years ago #

    I changed index.php as well but it didn't effect the page. May be there is an option to enable for selecting a template for these kind of pages.

    Roohullah

  5. Digital Raindrops
    Member
    Posted 2 years ago #

    For Twenty Eleven you should be using a child theme, and the changes will work if you have done them right!

    This will depend on what you are changing, to change the posts then you need to understand get_template_part() and how these can be styled with the post_class()

    Have a look at this post, where we change the archive content, the download is a twenty eleven working child theme, so it does work!

    HTH

    David

Topic Closed

This topic has been closed to new replies.

About this Topic