meta_compare is breaking
-
Hello,
I really like this plugin and it is working pretty well. I have multiple meta requirements that I want my code to pass. The first is that the post is less recent than when the page loads. The second is that the scrollcontent_page meta_key is a certain value (which I calculate in php).
I used the shortcode builder and my meta_compare=”<:=”. When I use the less than symbol, the shortcode returns the text of the shortcode, as opposed to any posts. I know it is the less than symbol because when I remove it, it loads fine, but the comparison doesn’t work as I need it to.
Here is the relevant code I have:
if ( !isset($time)){ $time = ( isset($_GET['pagestamp']) ? $_GET['pagestamp'] : time() ); } $scrollcontent_page = get_post_meta( get_the_ID(), 'scrollcontent_page', true ); echo do_shortcode(' [ajax_load_more post_type="scrollcontent" post_format="standard" meta_key="scrollcontent_pagestamp:scrollcontent_page" meta_value="'.$time.':'.$scrollcontent_page.'" meta_compare="<:=" meta_relation="AND" orderby="meta_value_num" order="desc" offset="0" posts_per_page="8" scroll_distance="-300" max_pages="0" transition="fade" button_label="Loading Fun..."] ');This is on http://www.memerize.net. I can put it to the less than symbol if you want to see the message for yourself.
Thanks!
The topic ‘meta_compare is breaking’ is closed to new replies.