• Hi there,

    Still getting my head around wordpress and custom posts.

    So, I’ve got three custom post types… articles, news and videocasts.
    I want to have the “home” page for each of these sections use the same template and display all posts in each of the custom post types.
    I can understand how to do this if I had a custom page for each post type using the
    query_posts( 'post_type=name');
    query…

    But how to I make this dynamic so that I only have to have one template and the ‘name’ above is replaced with the post_type name from the url. eg in articles it would be http://www.example.com/articles and the template would know that it should be displaying all posts from the articles custom post type?

    I’m sure there is a super basic solution to this…?! Any help would be very much appreciated.

    Thanks! mark

The topic ‘How to have section template for custom post types’ is closed to new replies.