I'm trying to get the hang of custom post types and I am trying to get them to loop through the post types within a page template. I'm already using the MultiEdit plugin to display certain content regions within my template. Overall, here is what my template page looks like:
<?php
/*
Template Name: Home Template
MultiEdit:Icons,NameTitle,CategoriesTitle
*/
?>
<?php get_header(); ?>
<?php query_posts( 'post_type=homecategories'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="main">
<section>
<div class="icons">
<?php multieditDisplay('Icons'); ?>
</div><!--end icons-->
<div class="slider">
<?php the_content(); ?>
</div><!--end slider-->
<div class="title">
<?php multieditDisplay('NameTitle'); ?>
</div>
<div class="categories">
<?php multieditDisplay('CategoriesTitle'); ?>
<!--this is where I want the custom posts to loop through-->
<div class="items">
<!--image of the custom post type-->
<img src="" />
<span><!--title of custom post type--></span>
</div>
<!--end of the custom posts loop-->
</div><!--end categoires-->
<div class="news">
</div><!--end news-->
<?php edit_post_link('Edit this entry.', '<p>', '</p>');
?>
</section>
</div><!--end main-->
<?php //comments_template(); ?>
<?php endwhile; endif; ?>
<?php //get_sidebar(); ?>
<?php get_footer(); ?>
If I keep it like this the only thing that shows is the entries from the custome post type and nothing else. And what I am trying to accomplish is get it to only display the custom post types within this section in the template:
<div class="items">
<!--image of the custom post type-->
<img src="" />
<span><!--title of custom post type--></span>
</div>
<!--end of the custom posts loop-->
Like I mentioned, I'm still getting the hang of using and implementing custom post types and I'm not really sure if this is the right way to go or not.
Thanks!
homecategories
, which sounds like a name for a taxonomy, not post type.