Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Thanks for this.
    I’ll get this fixed asap.

    Plugin Author Darren Cooney

    (@dcooney)

    Hi Djules,
    I don’t see the incorrect argument?

    month is passed to preloaded and then converted to monthnum.

    Thread Starter Djules

    (@djules)

    Hi,

    I’m talking about the ‘month‘ key in the array of arguments to preload posts.

    Line 264 in ajax-load-more.php, the key you used for month is ‘month’, but it should be ‘monthnum’ as used in the WP_Query object.

    The arguments are filtered (line 282) just before being used for the query. This is where I transform month to monthnum until it’s fixed.

    When you say month is converted to monthnum, where is that ?

    Thanks.

    Plugin Author Darren Cooney

    (@dcooney)

    preloaded line 144:

    if(!empty($month)){
       $args['monthnum'] = $month;
    }

    Thread Starter Djules

    (@djules)

    I’m sorry but line 144 of what file ?

    I found these 3 lines of code line 553 in ajax-load-more.php, in the function alm_query_posts, but this function is only used when doing AJAX query, when you want to display preloaded posts, the function is called line 284, in the function alm_shortcode.

    Let me know if I’m wrong.

    Plugin Author Darren Cooney

    (@dcooney)

    Line 144 of the Preloaded Add-on.

    Thread Starter Djules

    (@djules)

    Ok thanks, was looking in the main plugin and not in the addon, it makes sense.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Wrong argument for month in preload query’ is closed to new replies.