Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

How to list wordpress posts on a page from a certain category?

Featured Replies

Hey

 

Does anyone know how to list posts in a certain category on a page in WordPress?

 

 

Thanks.

  • Author
Hey Meshach,

Have a look at the codex, in particular 'Conditional Tags' and if(is_page) etc alongside wp_list_categories()

 

*has anybody else noticed that the codex has changed? I can't find anything anymore :( *

 

Thanks for the link!

 

 

Hey meshach take a look at page_links_to.

 

Thanks Thomas.

  • 2 weeks later...

Hey dude,

 

Try this on for size...

 

// 9 = Amount of posts to display, if you remove showposts=9 it will show all.
// 5 = Your category number which can be found from your admin or in your DB.
<?php query_posts('showposts=9&cat=5'); ?>
<?php while (have_posts()) : the_post(); ?>

<h1><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"></h1>

<?php the_excerpt(); ?> 

<p><a href="<?php the_permalink() ?>" rel="bookmark">">Read More</a></p>

<p><?php the_author() ?></p>

<p>Category: <?php the_category(', ') ?></p>

<p>Tags: <?php the_tags(' ', ', ', ' '); ?></p>

<p><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><!-- | <?php trackback_rdf(); ?></p>

<?php endwhile; ?>

 

Hope that helps.

Brilliant ThomasHardy - that plugin will come in very useful very soon. Thanks :)

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.