• Resolved BiDbMAK

    (@bidbmak)


    Hi I use this shortcode:
    [ajax_load_more post_type=”event” meta_key=”event_end_date” meta_value=”‘.$today.'” meta_compare=”<“]
    and it’s not run the shortcode, no errors not enything, just echo shortcode like the text.

    But other works good like this one:
    [ajax_load_more post_type=”event” meta_key=”event_end_date” meta_value=”‘.$today.'” meta_compare=”>”]

    Can you somehow help me, please?

    Thanks.

    P.S.

    This query works well

    $today = date('Ymd');
    $events_past_args = array(
        'post_type' => 'event',
        'posts_per_page' => 12,
        'meta_query' => array(
            array(
                'key' => 'event_end_date',
                'value' => $today,
                'compare' => '<'
            ),
        ),
    );
    • This topic was modified 6 years ago by BiDbMAK.
    • This topic was modified 6 years ago by BiDbMAK.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Darren Cooney

    (@dcooney)

    Hi bidbmak,
    You could try this little known trick for less than.

    In your shortcode.

    meta_compare=“lessthan”

    The reason this happens sometimes is because < try’s to convert to an HTML element.

    Let me know if that works.

    Thread Starter BiDbMAK

    (@bidbmak)

    @dcooney Thanks a lot man! I spend 2 days on this to debug somehow this stuff! Today already rewrote it on custom ajax scroll load more) But now I think I’ll back the ajax_load_more plugin)

    Thanks a lot! Have a nice day!

    Plugin Author Darren Cooney

    (@dcooney)

    No prob. Yes, please go back to ALM ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Meta compare not works, really need help.’ is closed to new replies.