adding tax_query to $query_string

the best way of doing this is WP_Query $query = new WP_Query( ‘post_type’ => ‘post’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘my_custom_tag’, ‘slug’ => ‘slug’, ‘terms’ => array( ‘my_tag_slug’ ), ‘operator’ => ‘in’, ), ) ); and you should do the ajax callback like this add_action( ‘wp_ajax_my_action’, ‘my_action’ ); function my_action(){ //my custom code … … Read more

Query string order by custom field

The query_posts is only useful when you actually know what you are doing. Base on the info you provide this should work for you : $the_query = new WP_Query(array( ‘post_type’ => ‘your_cpt’, ‘posts_per_page’ => -1,//get them all ‘meta_key’ => ‘field_4’, ‘orderby’ => ‘meta_value’, ‘order’ => ‘DESC’ )); ?> <?php if( $the_query->have_posts() ): ?> <ul> <?php … Read more

Custom Rewrite Rule Removing Query String

Two parts to this answer: There are multiple things going wrong with your current example, and some of them are caused by WordPress’s rules making things more complicated. If you don’t mind editing your .htaccess file directly, try this. It avoids having to deal with some WordPress magic that isn’t making things easier here. It … Read more

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