Ajax WP_Query reutrns no results on author.php

Well i figured it out somehow. There were two causes to that issue: tax_query array values cannot be empty. it either the array keys are populated, or there shouldn’t be an array at all. I don’t know why, but giving author a number didn’t work. I’ve changed it to ‘author__in’ => array($author) and it worked. … Read more

Get and Trim Full Post Content in WP Query

I think the best thing to do would be to just simplify what you’re doing. I’d just do something simple with it if all you’re attempting to do is trim the amount of characters output. I’d use mb_strimwidth to trim the characters, and within that run wp_strip_all_tags() on get_the_content(). Like this: $content = mb_strimwidth(wp_strip_all_tags(get_the_content()), 0, … Read more