WP_Query: Fetch posts that are in (category1 and not in category2), OR posts that are not in cagegory1

Here we go, try a tax_query instead http://codex.wordpress.org/Class_Reference/WP_Query#Taxonomy_Parameters … ‘tax_query’ => array( ‘relation’ => ‘OR’, array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( ‘event’,’show_on_front’ ), ‘operator’ => ‘AND’, ), array( ‘taxonomy’ => ‘category’, ‘field’ => ‘slug’, ‘terms’ => array( ‘event’ ), ‘operator’ => ‘NOT IN’ ) )

Overwrite URL on blog posts

If you are not using Custom Post Types the following in your permalink settings should work just fine. /blog/%postname%/ Screenshot (Below can still be applicable depending on your use of custom post types) Keep your regular permalinks on blog like you have it in settings. And in your custom post type arguments the “with_front” Boolean … Read more

Replace the attribute_escape to esc_attr()

Deprecation is… status applied to features, characteristics, or practices to indicate that they should be avoided, typically because they have been superseded. In other words, attribute_escape has been replaced by esc_attr. Any time you use a deprecated function WordPress triggers the error you’re seeing. Somewhere in your codebase a deprecated function is being used. To … Read more

How can i put image to come first than the title?

You can’t use the post content to add an image outside of the call to the_content(). If you want to look into implementing Post Thumbnails (i.e. Featured Images) into your Theme. Full implementation is outside the scope of a simple question-and-answer; however, in the end, your markup will change from this: <h1 class=”title”><a href=”https://wordpress.stackexchange.com/questions/87953/<?php the_permalink() … Read more

Help post permalink

The post slug is generated in the wp_insert_post (…/wp-includes/post.php) function. The function calls another function to sanitize the your post title. You can use the filter sanitize_title (…/wp-includes/formatting.php) to replace – by +. This will change the behavior in more situations then just the title of a post. So you should check if it is … Read more