• 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

Sort Agentpress Pro Listings

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 › Sort Agentpress Pro Listings

This topic is: not resolved

Tagged: agentpress sort order

  • This topic has 7 replies, 4 voices, and was last updated 9 years, 7 months ago by Ginger.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • July 21, 2015 at 9:53 am #159990
    brent s
    Member

    I am wanting to use the Agentpress Pro theme and the agentpress listing plugin to create a site offering home services, not homes. When a search is performed using the agentpress listing search box, I really need the results to be returned and ordered by price (lowest to highest). I tried using the code on Carrie Dils site (http://www.carriedils.com/sort-agentpress-listings-by-price/), but it did nothing.

    Is there a snippet of code, plugin, or some way to accomplish this?

    July 22, 2015 at 10:44 am #160117
    Ginger
    Participant

    Hi Brent,

    I saw your same comment on Carrie's tutorial. We were finally able to get it figured out! She will be updating her tutorial post with the info, but for now here is the code snippet. This sorts descending, if you wanted to start ascending just change it from 'desc' to 'asc'


    @gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options

    July 22, 2015 at 9:26 pm #160174
    brent s
    Member

    Ginger,

    Thank you so much.

    November 18, 2015 at 11:51 am #171434
    rtibbs4
    Participant

    Hi,

    tried this this agentpresspro and it has no affect. Just place in functions.. correct?


    Thanks, Randy

    November 18, 2015 at 5:26 pm #171477
    Ginger
    Participant

    Hi Randy,

    Yep, it goes in functions. Hmm, the way we had it it sorts the listings archive page but not the featured listings on the homepage. Delete the check for is_main_query and then it sorts in both places. So the "if" line will look like this:

    if( !is_admin() && is_post_type_archive( 'listing' ) ) {

    Hope that helps!


    @gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options

    December 15, 2015 at 4:49 am #173810
    simonsg
    Member

    Thanks very much Ginger, this worked perfectly for me.

    December 15, 2015 at 4:55 am #173811
    simonsg
    Member

    Well, I say that it's worked perfectly, that's true, it has ordered the properties in price order after a search but on more than one occasion, the lead picture of some properties, i.e. the featured image, doesn't show on the list of results, it just shows a grey box with an icon of a grey house inside it.

    Has anyone else had this problem...if so, please can you let me know what the problem is.

    Thanks.

    December 15, 2015 at 10:15 am #173837
    Ginger
    Participant

    Hmm, I haven't seen this. You might want to start a new forum post with this issue and include a link to where it is happening?


    @gscoolidge | Support Nerd | Website Producer/Tweaker | IDX Integrations | Hosting Options

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 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

© 2025 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