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.

Wordpress help

Featured Replies

I've been having a look at wordpress and I cant work out how to get certain posts to show in certain areas of the site

 

I've named a catorgory and all posts in there I want to show in just one area

 

I want to do this 3 times in all

 

I'll carry in searching Its probably something really simple but this is first time I've looked at word press so plodding along with a bit of trial and error at the moment

 

thanks

What do you mean by just one area? Do you have an example link, or a photoshop mockop/wireframe?

 

Most likely, what you're looking for is the Wordpress loop, which is what gets each article. You can loop through articles as many times as you'd like on a page, each time passing different filters.

 

You can read more here, but basically for example what you can do ( this will display an unordered list with 10 latest posts from the category with the ID of 2. you can also identify the category by its slug by changing category_id=2 to category_name=tutorials )is have one loop go through category 3:

 

<ul>
<?php query_posts('category_id=2&posts_per_page=10'); ?>

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

 <li><a href="<?php the_permalink();?>"><?php the_title(); ?> <small><?php the_date('l F jS, Y'); ?></small></a></li>

 <?php endwhile; else: ?>

 <p><?php _e('Sorry, no posts matched your criteria.'); ?></p>

<?php endif; ?>

</ul>

 

And you can loop through another category (category 3), by changing the first line of PHP to:

 

<?php query_posts('category_id=3&posts_per_page=10'); ?>

 

Hope this helps!

  • Author

Brilliant just what I wanted Cheers Empek

 

What do you mean by just one area

 

I should have said I had a div with h3 tag and paragraph that I wanted to insert the title and the post into

 

with your help I've managed it

 

Thanks again

Great! You're very welcome!

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.