Ignoring ‘a’ when sorting posts

That’s because you are matching from the fourth character as it was supposed to be used only with “the ” (three characters onwards). Then the author of article added an “an ” which has a similar effect. I think he didn’t test for “a ” after all. Your code matches this: Horror of Party Beach … Read more

WordPress conflict with multiple load more posts functions on click

check your portfolio-scripts.js and blog-scripts.js both action contain same action. ‘action’: ‘load_more_posts’, So for your portfolio-scripts.js action Should be ‘action’: ‘loadmore_portfolio_posts’, instead of ‘action’: ‘load_more_posts’, You declare the function in portfolio-scripts.php but not call in the ajax. I guess change the action solve your problem.

What is the best way to reset a search on a meta_key / meta_value?

I wouldn’t push the meta query entries like that but build it more logical. So for example: $meta_query_args = array( ‘relation’ => ‘AND’ ); // assuming you want ‘AND’ search, you’re using both in your example if ( ! empty( $_POST[‘city’] ) && $_POST[‘city’] != ‘0’ ) { $meta_value_ville = $_POST[‘city’]; $meta_query_args[‘city_clause’] = array( ‘key’ … Read more

List users by Year of Birth using a foreach loop to dynamically populate years and data

So, I solved this by doing a regular get_user() and putting it inside a for loop of years and ran the get_user on each year. $currentYear = date(‘Y’); $years = range($currentYear, 1900); foreach($years as $year){ $TotalArray = get_users(array(‘meta_key’ => ‘date_of_birth’, ‘meta_value’ => $year, ‘count_total’ => true, ‘meta_compare’ => ‘LIKE’, ‘role__in’ => ‘members’)); $thisYearsTotal = count($TotalArray); … Read more