wp_query loop with compare operator simply not working, why?

As stated in the documentation: (bold formatting was added by me) Note that meta_query expects nested arrays, even if you only have one query. So your meta query should actually look like the following, and note that in a meta_query, we don’t use the meta_ prefix, e.g. we use just key and not meta_key: $query_args[‘meta_query’] … Read more

How does ‘category__not_in’ differ to cat => ‘-1’?

Looking at the codebase, the only difference appears to be that category__not_in excludes child terms from selection, whereas cat does not. Should category__not_in be used with caution, similar to posts__not_in? Absolutely, but for different reasons. The main issue with excluding posts is that it causes problems for caching – every query with a different excluded … Read more

Elementor custom query

This just requires adding additional parameters to the query->set() array… …it’s standard WP_Query() stuff. So you’d essentially be taking this line: $query->set( ‘post_type’, [ ‘libri’, ‘post’] ); …and expanding it to include a tax query… $tax_query = array( ‘relation’ => ‘OR’, //can also use ‘AND’ depends how you want it to work array( ‘taxonomy’ => … Read more

Undefined variable [closed]

As the error states, your $my variable is not defined. The reason behind it is that you only defines $my when $the_query->have_posts(). Adding $my = ‘No results found’; right after $the_query = new WP_Query( $args ); would solve your problem. $my would then be redefined if results are found.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)