Setting Custom Sort Order of Posts within a Category

I’ve got this category setup that includes several posts. By design it’s not a blog, but a staff listing. Currently all of the staff members have their own posts with the category. I’d like to be able to sort the order they are displayed in in their parent category.

How do I go about doing this in the most user friendly manner? My client may want to change this sorting order in the future, especially when staff members leave or new ones get hired.

Read More

Any and all help will be greatly appreciated.

http://gointrigue.com/beta/faculty/

To expand on this: In the link I’ve provided you’ll be taken to a category page I made called /faculty/. In this category page I have several posts listed. WordPress automatically lists them in the order they were created. With the most recently created post being listed first.

I want to list them in my own custom order. How do I do this?

Related posts

Leave a Reply

2 comments

  1. Now that I have a better understanding of the issue, I would recommend using custom fields to sort your posts. You can have a custom field (e.g., “order”) and use it to indicate the order of your posts. You then need to use a custom query to order these posts when they are displayed. You can use a custom query like the following:

    $args = array(
        'meta_key' => 'order',
        'orderby' => 'meta_value',
        'order' => 'ASC'
    );
    
    $custom_query = new WP_Query();
    $custom_query->query($args);
    
    if($custom_query->have_posts())
    {
        while($custom_query->have_posts())
        {
            $custom_query->the_post();
    
            // Do the loop stuff
        }
    }
    

    Please see the WP_Query class page for more information about all of the arguments that you can use to create custom queries.

  2. I’m a little confused by your post as I think it could be asking a few different things. If you are asking how to order your categories by a custom order, please check out Custom Taxonomy Sort, a plugin that does just that. You can specify an order for each taxonomy term.