Hello everyone,
Here’s what I did and figured out so far: https://codepen.io/AnSHLaGG/pen/PRxzzb
Using QuotesOnDesign v 4.0 API
Thing is, when I send a GET request to the API, it fetches back posts uncontrollably, of any length. And only then do I filter out the Twitter-friendly options.
So at times, when a post that is too long is fetched, I’d like it to get skipped. My current ‘if’ statement is working - but whenever a longpost appears, it only won’t show up, and it’s as if the ‘Next Quote’ button does nothing (though it does).
I’ve read multiple times through this https://codex.wordpress.org/Class_Reference/WP_Query and there’s a ton of filters to sort posts by date, size per page, amount of comments etc… and not a single one to control their length. I’ve tried using something along the lines of
'meta_query' => array(
key => 'content'
value => '140'
compare => '<='
)
and it won’t work.
Perhaps you could point me to a better option?