Note that there are some explanatory texts on larger screens.

plurals
  1. POShow specific category posts on page
    text
    copied!<p>I want to show only specific post categories on the "Blog" page, which you can view here: <a href="http://dev.n8geeks.com/blog" rel="nofollow">http://dev.n8geeks.com/blog</a></p> <p>Having tried literally everyone version of code which apparently helps with this, it leaves me with totally different styling or missing parts, such as no date or excerpt. </p> <p>At the moment, it's showing all categories (naturally) - how do I show a specific category whilst the formatting stays true to the current look? I simply want it to look exactly as you see there, except only showing a specific posts category.</p> <p>My second issue is that my "Videos" page is using the code below to show only posts from this specific category, however it's using the same template parts (content_single for example) as the "blog" page, which would be fine, but I've edited the content_single page files in order for it to look how i want (i.e. to display a thumbnail with a fancy box around it, but i don't want this on the Videos posts).</p> <pre><code>&lt;?php $my_query = new WP_Query('category_name=videos&amp;showposts=1'); ?&gt; &lt;?php while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post(); ?&gt; &lt;a href="&lt;?php the_permalink() ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;br /&gt; &lt;?php the_content(); ?&gt; &lt;?php endwhile; ?&gt; </code></pre> <p>So, I basically want to display ONLY the videos posts category on the videos page, but without the box that you see when you click on the post name (as seen here: <a href="http://dev.n8geeks.com/how-to-recognize-early-signs-of-autism/" rel="nofollow">http://dev.n8geeks.com/how-to-recognize-early-signs-of-autism/</a>) - hence why i want to use different template parts.</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