What params are you using for the [adverts_list] shortcode which shows the Ads? If it does not have the allow_sorting param set to 1 it will not sort items even if there is adverts_sort param in the URL.
Here lies the problem. Is the Category list generated by the plugin itself (to clarify, this is not from a page using the short code, the page is an advert category generated under the menu). As seen on this screenshot (note the lower left corner)
View post on imgur.com
Despite i have few pages with this the shortcode, majority of them are categories generated by the plugin and suffer from this issue. (At the moment of writing i haven´t tested the shortcode ones)
I disabled the custom list page to troubleshoot. But the adverts page has the parameter
View post on imgur.com
And with the default list now does not appear.
Found the culprit:
is plausible that in an earlier implementation i set in the documentation these lines in functions.php
add_action("init", "my_theme_wpadverts_init", 20);
function my_theme_wpadverts_init() {
remove_filter('template_include', 'adverts_template_include');
}
Once i disabled them. Voila. The filter works
EDIT: Too Early to Celebrate:
Adverts works but the Categories doesn’t work still even with the fixing. I guess i have to do the taxonomy page again.
-
This reply was modified 5 years, 10 months ago by
johndoe01.
FINALLY!
Indeed i had to do the taxonomy page as stated in the Child Themes documentation but the inner part i had to set it like this:
<?php if ( have_posts() ) {
global $wp_query;
remove_filter("the_content", "adverts_the_content");
echo shortcode_adverts_list(array(
"category" => $wp_query->get_queried_object_id(),
'allow_sorting' => 1,
));
} ?>
That allow sorting was that.
Now this is Completely SOLVED.
Hi,
ok great, i am glad you have it resolved and thanks for the detailed feedback, maybe someone in the future will find it helpful as well.