Candes Theme for WordPress | Rich Wood Theme?

You Like Wood? You’ll love this theme!

Check out this beautifully designed theme, with a rich wood background and beautiful color palette. read more

Viva 7 Magazine Themes from MediaTricks

Tim Waddell from Mediatricks has done it again. The company behind the impressive Viva plugins has just dived into the theme biz and is making a big splash. read more

Revolution Theme 3.0 | The Revolution Theme Updated

Brian Gardner has recently upgraded the Revolution Theme to Version 3.0. Check out all of the changes!

read more

How to include posts within a page using WordPress

Hey everyone. Thought I’d share a solution to a problem I just solved.

I was creating a portfolio of case studies for a client and I want to use the “posts” within WordPress to list the case studies. However, the main menu uses the ‘wp_list_pages’ function, so I cannot interject a “portfolio” category link where I want that link placed within the menu, since it is auto-generated.

This means I could hard-code the portfolio category link at the beginning or end of the menu - but I need it somewhere in the middle, so I devised this workaround.

I have found the best way to do this is through the creation of a page template. This offers you the greatest flexibility, and will also help you learn a bit more about WordPress.

OK - enough blabbing, let’s get started.

  1. First thing to do is look in your theme folder for a file named page.php - make a copy of it and rename it to an appropriate name - we’ll use Portfolio.php for this example.
  2. Next, open the new file (portfolio.php) and copy and paste this into your file at the very top (change the name ‘Portfolio’ in the code to the name of your choice - this is the actual name of the template that will be listed when selecting the template from within the Write/Manage Page editor:<?php
    /*
    Template Name: Portfolio
    */
    ?>
  3. We will be pulling all posts from within a single category into this page. Create your new category now, and take note of the category’s ID. If your category already exists, just get its ID.

    Note
    : To find the ID, go to Manage >> Categories and hover your mouse over the Category Name. You will find the ID as the last parameter of the URL in the browsers status bar (bottom-left corner)
  4. Ok, back within the Portfolio.php, we need to replace the default code with new code that will import the posts from the category we’ve created / selected. Here’s how:
  5. Replace the loop (code varies so I have just included the beginning and ending tags - replace / remove everything between the tags and the tags themselves: <?php while(have_posts()) : the_post(); ?>
    ………
    <?php endwhile; ?>

    with this below - where ‘category=[the ID of your category you noted in step 3]‘:

    <?php
    $lastposts = get_posts('category=3');
    foreach($lastposts as $post) :
    setup_postdata($post);
    ?>
    <h2><a href="<?php the_permalink(); ?>" id="post-<?php the_ID(); ?>"><?php the_title(); ?></a></h2>
    <?php the_content(); ?>
    <?php endforeach; ?>

  6. Save the template.
  7. Create / Select the page you want to import the posts within - you should be in the page editor
  8. From within the page editor, under the Page Template dropdown, select ‘Portfolio’
  9. Publish / Save the page.
  10. Create posts under your selected category, if they are nor already present.
  11. Go to the front-end of your website and locate your new page. You should see the page displaying the posts you have created from within your selected category.
  12. As for placing the page’s link in the menu - just set your page order for the page.

That’s it. Pretty cool, huh?

WordPress templates are easy to create and offer you tons of flexibility.

Obviously, you can place any code you like in a template. The above is just an example of including the posts from a specific category. There are more option at WordPress.org.

Proximity News Theme for WordPress

This theme claims to be the most advanced News Theme available. Is it? read more

Pass It On | Premium WordPress Theme

WordPress-Designers.com releases Magazine/News Theme.

read more

A WordPress Theme Built for Bands

Need a template for a band? Check out “The Best Damn Band Template Ever”. Only $30.00! read more

Press Box Premium Theme for WordPress

Press Box is a simple, striking theme for Wordpress. It’s a modern theme with a lot of options.  Widget ready for WP 2.3/2.5+ read more

CelebrityPress | A Sexy WordPress Theme

WordPress has never been this sexy!

This is one b-a-u-teeful theme for starting your own celebrity magazine. Everything you need is here including a killer design, that comes in a couple of flavors.

read more

Sketchd | Grunge Theme

WordPress-Designers.com releases another brand new theme

Here is a theme that doesn’t look like the others. This theme is very clean and yet may meet your demands for the worn and dirty look.
read more

Next Page »