Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>You're looking way too hard at this code. You don't need to exclude anything, you just need to include cat <code>13</code>, which will include everything that is in cat <code>13</code>; <em>even</em> if it is in other categories as well. Just run a regular <a href="https://codex.wordpress.org/Class_Reference/WP_Query" rel="nofollow noreferrer"><code>WP_Query()</code></a> like so:</p> <pre><code>&lt;?php get_header(); ?&gt; &lt;div id="primary"&gt; &lt;div id="content" role="main"&gt; &lt;?php if (is_home()) { // The Query $the_query = new WP_Query("cat=13, paged=".get_query_var('paged')); } ?&gt; &lt;?php if ( have_posts() ) : ?&gt; &lt;?php twentyeleven_content_nav( 'nav-above' ); ?&gt; &lt;?php /* Start the Loop */ ?&gt; &lt;?php while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post(); ?&gt; &lt;?php get_template_part( 'content', get_post_format() ); ?&gt; &lt;?php endwhile; ?&gt; &lt;?php twentyeleven_content_nav( 'nav-below' ); ?&gt; &lt;?php else : ?&gt; &lt;article id="post-0" class="post no-results not-found"&gt; &lt;header class="entry-header"&gt; &lt;h1 class="entry-title"&gt;&lt;?php _e( 'Geen berichten beschikbaar', 'twentyeleven' ); ?&gt;&lt;/h1&gt; &lt;/header&gt;&lt;!-- .entry-header --&gt; &lt;div class="entry-content"&gt; &lt;p&gt;&lt;?php _e( 'Helaas, er zijn nog geen gearchiveerde berichten in deze categorie. ', 'twentyeleven' ); ?&gt;&lt;/p&gt; &lt;?php get_search_form(); ?&gt; &lt;/div&gt;&lt;!-- .entry-content --&gt; &lt;/article&gt;&lt;!-- #post-0 --&gt; &lt;?php endif; ?&gt; </code></pre> <p>(had to add a few charachters or I could not edit, sorry :P)</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload