Create /archive page in WordPress Theme

What I’m trying to do is make a separate page on the site that lists all posts (not sorted by tag/category/year) in a single, easily-accessible portion of the site by just going to /archive (e.g. www.example.com/archive) The correct approach is, indeed, to create a custom page template, so that the user can create a static … 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

Trying to display ads on only a third of posts in a loop. Keep getting Error 500?

echo “<img src=\”” . bloginfo(‘template_url’); . “/img/sample-ad-side.png\” alt=\”Sample Advertisement\”>”; You added a semicolon, what comes after that semicolon is a new statement. . “img/ etc is not valid PHP, so it errors out. Also bloginfo does not return its value, it prints it, so you need to change that to get_bloginfo. I would suggest you … Read more

Search results load individual post in slide out div

Since you wanted best-practices, methods, advice, here is my take on how you should proceed: First of all, divide the content of your page in two ideal spaces, the list of posts, and the content. Something like this: <nav class=”post-navigation”> <ul> <li> <h2>{Post title}</h2> <p>{Excerpt} [&hellip;]</p> <p><a href=”https://wordpress.stackexchange.com/questions/87312/{post-permalink}”>Read more &rarr;</a></p> </li> </ul> </nav> <section class=”post-content”></section> … Read more

Customing Annual Archive plugin

Try this, you need to use two filters “getarchives_where” and “getarchives_join” to alter the way archive are shown and include your category 17.. function widget( $args, $instance ) { extract($args); //$c = $instance[‘count’] ? ‘1’ : ‘0’; //$d = $instance[‘dropdown’] ? ‘1’ : ‘0’; $format = empty($instance[‘format’]) ? ‘html’ : apply_filters(‘widget_type’, $instance[‘format’]); $type = empty($instance[‘type’]) … 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’ ) )