WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Custom post type - List posts by 'Order' number (2 posts)

  1. Zane
    Member
    Posted 9 months ago #

    Hi there,

    I am new to the loop. I create a custom post type for a client and everything is working fine. However the client wants to order the display of posts by adding numbers to the post 'Order' value.

    I have used a very basic loop to display the posts, but it seems to ignore the posts 'Order' value and displays the oldest to newest.

    I used:

    <?php query_posts('post_type=gallery'); ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>
    <?php
    if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it.
    the_post_thumbnail('thumbnail');
    }
    ?>

    I am sure I am missing something really basic. Any advice please?

    [Moderator Note: No bumping. If it's that urgent, consider hiring someone.]

  2. Zane
    Member
    Posted 9 months ago #

Reply

You must log in to post.

About this Topic

Tags