How to exclude one category

You can use “category__not_in” array parameter. Also, I’ve modified your code just a bit, you should use wordpress best practice which is “if -> while” to display the posts. Please try these code below as I haven’t tested it yet. <?php // Default arguments $args = array( ‘posts_per_page’ => 6, // How many items to … Read more

List child pages, exclude the current page

Looks like a syntax error to me. Try: wp_list_pages(“title_li=&child_of=2143&exclude=$current_post_id”) OR wp_list_pages(“title_li=&child_of=2143&exclude=”.$current_post_id) Also I will suggest to pass parameters as array instead of a string, for better debugging. wp_list_pages( array( ‘child_of’ => 2143, ‘exclude’ => array( $current_post_id ), ); Make sure $current_post_id is giving proper value.

Exclude category from WP_Query args not working

After a lot of searching I ended up finding this option that worked: Adding one exclude parameter to the get_terms list at the top. Like this: $tourDateArtists = get_terms( array( ‘taxonomy’ => ‘category’, ‘hide_empty’ => false, ‘exclude’ => ‘1’, ) ); Still not sure why neither ‘cat’ => ‘-1’, nor the particular tax_query param I … Read more

Multiple Taxonomy post query with exclusion

If I understood you correctly, an array of terms either slug or term_id, for example, depending on field to be exact. $args = array( ‘post_type’ => ‘a_post_type’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘tax_one’, ‘field’ => ‘slug’, ‘terms’ => array( ‘action’, ‘comedy’ ), ), array( ‘taxonomy’ => ‘tax_two’, ‘field’ => ‘term_id’, ‘terms’ … Read more

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