On my new theme I’m coding into WordPress, I’m using custom post types for the homepage sliders.
I gave my custom post type the ability to edit the page attributes like order. But, for some reason, when I query them on the homepage, they don’t display in the order I specified within the custom post type.
If I view the custom post type page, it lists them in the order that I specified, but in the slider, it doesn’t show them in the order that I set them as. It still lists them according to date.
Does anybody know how I can fix this?
Here’s my code:
<?php $loop = new WP_Query( array( 'post_type' => 'slider_item' ) ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<?php the_title(); ?>
<?php the_content(); ?>
I don’t know if that has anything to do with it but just posting it just in case.