Search / Listings order

This topic contains 7 replies, has 3 voices, and was last updated by  Alex Rollin 5 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #428001

    jotomas
    Buyer
    Post count: 802

    Hi,

    Is there some way to achieve the following order in listings pages and in search pages (when user does not use any search keyword or distance term)?

    First the featured listings from A to Z and then the non-featured listings from A to Z.

    I have been trying with sorting options but I have not ben able to achieve it.

    I look forward to your reply.

    Thank you very much for your attention.

    Best regards.

    #428070

    Alex Rollin
    Moderator
    Post count: 27815

    Sorting options only apply to the Listing pages. What you can do with sorting options is apply the “Featured” firs.
    https://wpgeodirectory.com/docs/core-place-settings/#sorting

    To show featured listings on the search or listings pages, you can also apply a GD Popular posts view widget to those pages. The widget has options for “Show Featured Only”. This can be placed at the top to give featured listings lots of exposure, or at the bottom.

    If there is a problem, and you are not seeing the results you expect, we would be happy to take a look. For this issue, please be sure to send over the following information.

    Listing/Category type page URL where the listing should appear:
    Listing Detail page url, for the listing you want to appear on that page:

    WordPress Credentials
    WP Admin Login URL:
    WP Admin Username:
    WP Admin Password:

    #428398

    jotomas
    Buyer
    Post count: 802
    This reply has been marked as private.
    #428430

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    Though it is possible to add additional sorting methods, these are not effective in V1.

    Is it your goal, featured first then A-Z ascending? Here is a snippet for that.

    
    
    
    add_filter('geodir_posts_order_by_sort','_my_custom_order_by',10,3);
    function _my_custom_order_by($orderby, $sort_by, $table){
    	global $wpdb;
    
    	if($sort_by=='is_featured_asc'){
    		$orderby .= " $wpdb->posts.post_title ASC, ";
    	}
    	return $orderby;
    }
    

    https://wpgeodirectory.com/support/topic/archive-display-sorting/#post-392275

    You can add this with the code snippets plugin.

    https://wpgeodirectory.com/docs/customizing-your-style/

    #428582

    jotomas
    Buyer
    Post count: 802

    Hi Alex,

    Great! Thank you very much!

    Best regards.

    #433807

    Mark Cooney
    Expired Member
    Post count: 13

    Can this be amended to featured first in random order then the remaining listings in random?

    Or even better, Featured in the top with a featured title then everything else below.

    Preferably, with an image for the featured listings, then just a list for the remaining which be my ideal scenario?

    #433808

    Mark Cooney
    Expired Member
    Post count: 13

    Actually I just tried adding that and activating it, didn’t work for me

    #433892

    Alex Rollin
    Moderator
    Post count: 27815

    RE: Snippet, please see the original post with instructions

    https://wpgeodirectory.com/support/topic/archive-display-sorting/#post-392275

    Let us know if it works as expected, and if not please share wp credentials so we can take a look at the settings.

    Preferably, with an image for the featured listings, then just a list for the remaining which be my ideal scenario?

    The display of the listings is set on the Design – Listing page settings

Viewing 8 posts - 1 through 8 (of 8 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket