• Hi there,

    I’m fairly new to this so please bear with me. I just installed CMS Press and created my first custom content type and made a post within that content type. You can see it right here. http://3dsaccessories.net/3dsnews/

    What I’d like to do is have these posts also show up in the loop on my main page but I’m not quite sure how to go about doing that.

    I believe this is where i need to make changes but i’m not sure what to do.

    <?php
    			/* Run the loop to output the posts.
    			 * If you want to overload this in a child theme then include a file
    			 * called loop-index.php and that will be used instead.
    			 */
    			 get_template_part( 'loop', 'index' );
    			?>

    Thanks for any help you can provide.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter cunger

    (@cunger)

    Please help me with this.

    Thanks!

    Aimee

    (@greatdanemaniac)

    In your loop.php file, just add this line of code before the loop starts.

    <?php query_posts( array( 'post_type' => array('news', 'post') ) ); ?>

    I guess that it’s a 'news' CPT that you made. If not, just change the 'news' within the code to something else. I included the 'post' in there, since if you do not include it, the original posts will not be displayed.

    If you’d like to have more CPT’s displayed with your original posts, just add them like I’ve showed you.

    Good luck!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘How to include custom posts in homepage loop’ is closed to new replies.