WordPress.org

Ready to get started?Download WordPress

Forums

Duplicating the main loop for a custom post type (2 posts)

  1. toekneeh
    Member
    Posted 2 years ago #

    I have a custom post type and everything is working fine. I now want to create a page that loops through my custom post types that has the same surrounding widgets, header and footer as my main loop. Can someone explain to me what files I would need to "duplicate" to create this same look?

    I understand how to create a loop, just not sure I understand how the main loop is created enough to determine which files are involved.

  2. vtxyzzy
    Member
    Posted 2 years ago #

    Exactly what needs to be done depends on your theme. If you are using a free theme, post a link to its download site here and someone might be able to help. If you are using a paid theme, contact the theme supplier.

    In the simplest case, you will need to create a new template from your index.php file and add the parameter 'post_type=mycustomtype' to the query.

Topic Closed

This topic has been closed to new replies.

About this Topic