Create Magazine Theme for Wordpress

« Display image on front page with custom field« »Working from Home »

Magazine template/ theme is interesting, so this template-type is usualy not free to download. Magazine template is a template that designed like a magazine. We all know, magazine website have a category on each section. A standar template will display only all post on one section, like a blog.

Wordpress is designed to use as blog engine. But, with many modification, we can use wordpress engine as our website magazine website. Like this website, I using wordpress. But, you see, each category is displayed on any different section.

How to do this? I will telll you how to make wordpress theme to display post by category. each category is separated with others.

We can use function:

One section for one category

<?php
query_posts(’showposts=5&cat=3′); ?>

//showpost: number of post will be displayed

//cat=3; category id, find this on edit category. you will find cat id

<h3><?php
// this is where the name of each category gets printed
single_cat_title(); ?></h3>

<?php while (have_posts()) : the_post(); ?>
<h4><?php the_time(’M jS, Y’) ?> </h4>
<h2><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>” class=”title”>

<?php
// this is where the title gets printed
the_title(); ?>
</a></h2>
<p>
<?php
// this is where the excerpt gets printed

//excerpt is like a short content, you can use the_content the use readmore plugin.

the_excerpt(); ?>
</p><hr />
<?php endwhile; ?>

And this to display category as array:

<?php
// this is where you enter the IDs of which categories you want to display
$display_categories = array(5,6,7,8);
foreach ($display_categories as $category) { ?>
<?php query_posts(”showposts=5&cat=$category”);
$wp_query->is_category = false;
$wp_query->is_archive = false;
$wp_query->is_home = true;
?>
<h3><a href=”<?php echo get_category_link($category);?>”><?php
// this is where the name of each category gets printed
single_cat_title(); ?></a></h3>
<ul>
<?php while (have_posts()) : the_post(); ?>
<li><a href=”<?php the_permalink() ?>” rel=”bookmark” class=”title”><?php
// this is where title of the article gets printed
the_title(); ?></a></li>
<?php endwhile; ?>

Any question, send to my email: marketing[at]interlina.com

posted on on Tuesday, March 17th, 2009 at 7:15 pm
under Wordpress Tutorial
RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Find any information about marketing, tips, online earning on this site

Custom Search
laptop and computer store
revresponse

Recent Comments:

  • marketing niche strategy: Affiliate marketing is an excellent way for any business to market the products and...
  • datafeedr coupon code: In order to be prosperous in affiliate marketing, you have to design your site in such a way...
  • free online games for kids: GAMERS DREAM T-SHIRT. THIS IS A SWEET PLAYER FOUND T-SHIRT FOR ALL YOU HALO AND ONLINE...
  • Dann Monat: This can be the most useful article I’ve browse all year. GREAT stuff, many thanks!
  • Denita Minock: Great article, I must say I never scan something that summed it up therefore well. Something like this...

Recent Trackbacks: