Show last post of employee in his profile page

You can use the following code to get the most recent post by a given Author, just un-comment one of the two lines as appropriate. See the Codex for more info on WP_Query. The Codex entry is pretty long, so scroll down to the Parameters section for more info on the various options you can … Read more

Is it possible to have different header style blog titles in different categories?

I assume that any post belongs to only one category. Create respective CSS classes, e.g. ‘news-header’ and ‘mindset-header’, and use following code inside the loop: <?php // get post categories $categories = get_the_category(); // get single category $category = $categories[0]; // echo header with category class echo ‘<h2 class=”‘ . $category . ‘-header”>’ . get_the_title() … Read more

post content includes and seo vs. duplicate content

If the resources and the products are accessible on different unique URLs, but those pages shown the same content in certain areas, it could definitely be flagged as duplicate content. Sometimes you can’t avoid duplicate content. An example, to stay on the WordPress topic, is when you have blog posts, and category pages that list … Read more

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’ ) )