• Resolved TheGentAtWPforum

    (@thegentatwpforum)


    Hello and thank you for this fine product, I’ve been able to tweak and customize it to my needs perfectly so far. But what I don’t get to work is sorting my filters automatically by date. I have this in my functions.php:

    // === Standardmäßig nach Datum sortieren (neueste zuerst) ===
    function ymc_set_default_order($args) {
    $args[‘orderby’] = ‘date’;
    $args[‘order’] = ‘DESC’;
    return $args;
    }
    add_filter(‘ymc_filter_query_args_1261_1’, ‘ymc_set_default_order’);
    add_filter(‘ymc_filter_query_args_1273_1’, ‘ymc_set_default_order’);
    add_filter(‘ymc_filter_query_args_1349_1’, ‘ymc_set_default_order’);

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

    (@wssoffice21)

    Hi!
    We don’t know what this hook (filter) ymc_filter_query_args_1261_1 is
    This hook does not exist in the plugin itself.

    These are the default settings for sorting posts. https://prnt.sc/Z_ahcgbYsKEB

    If you are not satisfied with the default plugin settings, you can customize your settings. Use Advanced Query for this in the plugin settings section. See the plugin documentation: https://github.com/YMC-22/smart-filter#callback-function
    We hope this helps you.

    • This reply was modified 1 year, 1 month ago by YMC.
    • This reply was modified 1 year, 1 month ago by YMC.
    Thread Starter TheGentAtWPforum

    (@thegentatwpforum)

    Pretty embarassing, can’t say why I missed this while searching all options – thank you.:
    [quote]These are the default settings for sorting posts. https://prnt.sc/Z_ahcgbYsKEB[/quote]
    Any chance I can donate?

    Plugin Author YMC

    (@wssoffice21)

    Yes, of course, you can donate.
    That would be great.
    Send us your email to our address [email protected]
    We will provide you with the details

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Sort by date automatically’ is closed to new replies.