• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Blog Post Sorting – descending

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › Design Tips and Tricks › Blog Post Sorting – descending

This topic is: resolved

Tagged: blog post sorting, blog template, sorting

  • This topic has 6 replies, 2 voices, and was last updated 13 years, 4 months ago by csbeck.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • March 21, 2013 at 6:40 am #29914
    csbeck
    Member

    I'm using Metro theme. I have a page that uses the Blog template that lists Posts from a particular category. This page (a listing of events) needs to be shown in descending order of the events. So that the most recent added event goes on the bottom of the list. I only want this functionality on this page (and pages like it that show dated events). I want the Blog listing page to show in correct Ascending order to show the most recent blog post on the top.

    Here's the page: http://www.julieberrybooks.com/events

    Is there a way to do this? I tried looking up a plugin (WP Post Sorting) but it's not recently updated or supported in the latest WP version. I know I could always change the date that a post is created, but is there a way to sort posts on a per-page basis? It seems like there should be since I am able to list only a certain category of posts on a blog page (using custom fields - query_args). There's got to be a way to do this.

    I would appreciate any assistance!

    March 21, 2013 at 8:54 am #29952
    Robin
    Member

    How are you creating this page? Are you using query_args as a custom field? If you are, then you should be able to do this with the value. I've set one up with value "cat=7,8,9&orderby=title&order=ASC" for a client to pull those categories and order them by title alphabetically.

    So, theoretically, you could do "cat=x&orderby=date&order=DESC" (or ASC if that makes it work correctly) in addition.


    I do the best I can with what I’ve got. (say hey on twitter)

    March 21, 2013 at 9:05 am #29954
    csbeck
    Member

    You absolutely rock! I guess I was scared to try that. Thanks so much. Works like a charm!

    March 21, 2013 at 4:22 pm #30302
    Robin
    Member

    I adore query_args. Glad I could help!


    I do the best I can with what I’ve got. (say hey on twitter)

    June 17, 2013 at 2:49 pm #46405
    csbeck
    Member

    Do you know if there's a way to add custom fields to the query argument. I've tried a few things and it's not working.

    I thought I'd try:

    `cat=2&orderby=meta_value&order=ASC`

    But that didn't work.

    What I have is a custom field with a key of "last_name" and posts have different values with respect to the last name of people (there's a collection of people in a people category, the post title is a name - First Middle Last). So the custom field with the person's last name is in there so I could list these people on a blog listing page but I want to sort them by their last name.

    Or would it be better if I just created a custom Blog Listing page and created a custom loop?

    Any thoughts?

    June 19, 2013 at 12:28 pm #46785
    Robin
    Member

    I have a similar situation. What I did was change the slug on each person's entry to be their last name and let the query args sort by the slug. The full query args reads:
    `post_type=missionaries&orderby=name&order=ASC&nopaging=true`
    (It's a custom post type and I wanted it to show them all on one page--that's the extra code. But the relevant part is the orderby=name.) HTH


    I do the best I can with what I’ve got. (say hey on twitter)

    June 19, 2013 at 12:37 pm #46787
    csbeck
    Member

    Thanks Robin.

    I also started a new post with this similar subject - http://www.studiopress.community/topic/using-query_args-with-custom-fields/

    Hopefully this will help anyone else with this challenge.

    Chris

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble