I have a custom type called Events with a category called Forthcoming Events.
I’d like to create a slider for forthcoming events, something like
<ul id="forthcomingEventsSlider"> <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?> <li> <h1><?php the_title(); ?></h1> <img src="<?php print_custom_field('event_image'); ?>" /> <?php print_custom_field('event_content'); ?> </li> <?php endwhile; // end of the loop. ?> </ul>
I’m not sure how to ‘load up’ the Events from the home page and limit them to just events within the Forthcoming Events category.
Any advice would be appreciated, thanks.
- The topic ‘Include fields from custom type on the home page’ is closed to new replies.