• Resolved chinatownlee

    (@chinatownlee)


    I’m using the search form with sorting option enabled in archives. I can see that it’s the same in your demo, though there’s no sorting enabled.

    I’m using shortcode
    [adverts_list show_results=”0″ search_bar=”enabled” allow_sorting=”1″ category=”422″] which I echoed in archive.php

    However, the sorting seems to only work when you set show_results=”1″, but since it’s an archive the advert posts are then doubled.

    The search works, how can I sort the results?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    The allow_sorting params applies to current shortcode only, if you do not show results in the shortcode then there is nothing to sort.

    Thread Starter chinatownlee

    (@chinatownlee)

    Do you agree then that is quite difficult to be able to use the sorting functionality out of the box if the categorization of each advert is based on specific category (archives) and not on pages.

    Therefore, when the user clicks on the advert category that the single advert is assigned to (single.php) the user is directed to an archive not a page. So quite impossible to use sorting.

    Plugin Author Greg Winiarski

    (@gwin)

    This is how the categories work in WordPress and there is no easy way around it.

    If you do not like how the category pages are displayed read the Custom Taxonomy Template section here https://wpadverts.com/documentation/child-themes-and-templates/ it explains how you can use the shortcode directly in the archive page or use this https://github.com/simpliko/wpadverts-snippets/tree/master/alt-term-links snippet to direct whole traffic to your default page with [adverts_list] instead of category pages.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cannot sort ads in advert archives’ is closed to new replies.