How to put Breaking News on Top-Middle Column like indonesiabuku.com

Posted by themetutorial on Jul 6th, 2010 and filed under featured, gabfire, theme tutorial. You can follow any responses to this entry through the RSS 2.0. You can leave a response or trackback to this entry

In this tutorial I would teach you on how to put Breaking News on middle column on the right side of Featured section. This tutorial is inspired by question asked by bro togogsemar.

Bro Togogsemar asked on how to customize the WpAdvNewspaper theme to show breaking news on top-middle column (NpAdv_Widget2_R section).

Here, I will illustrate using screenshot of this website.

This is before applying this tutorial:

Before customizing breaking news location to top-middle column

This is after applying this tutorial:

After customizing breaking news location to top-middle column

You can see that the Breaking News has been put in that section; on middle column, and on the right side of featured section. This section is called NpAdv_Widget2_R in WordPress Advanced Newspaper version 1.2.

So to do that, you need to:

Go to wordpress admin panel.

Go to Appearance > Editor

Click on home.php

Find this code:
<!-- Entries on middle column on the right side of Featured section -->
<?php $d = 1; $query4 = new WP_Query();$query4->query('showposts='.$npdv_options["fea3PostCount"].'&cat='.$npdv_options["fea3CatID"]); ?>
<?php while ($query4->have_posts()) : $query4->the_post(); ?>
<div class="midColPost">
<?php if ($d == 1) { ?><span class="titleCatName"><a href="<?php echo get_category_link($npdv_options["fea3CatID"]);?>"><?php echo get_cat_name($npdv_options["fea3CatID"]); ?></a></span><?php } ?>
<h2 class="postTitle"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?> &raquo;</a></h2>
<a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php viva('NpAdvSideFea','4'); ?> " alt="<?php the_title(); ?>" class="alignleft" /></a>
<p><?php print string_limit_words(get_the_excerpt(),24); ?>...</p>
<span class="midColPostMeta" <?php if ($d == $npdv_options["fea3PostCount"]) { ?>style="border:none;"<?php } ?>><?php the_time('M j Y') ?> / <?php comments_popup_link(__($newspaper["noComment"]), __($newspaper['comment1']), __($newspaper['comments']));?> / <a href="<?php the_permalink() ?>" rel="bookmark"><?php echo $newspaper["readMore"]; ?> &raquo;</a><?php edit_post_link('Edit',' / ',''); ?></span>
</div>
<?php $d++; endwhile; wp_reset_query(); ?>
<!-- End of entries on middle column on the right side of Featured section -->

Replace with:
<!-- Entries on middle column on the right side of Featured section -->
<div class="widget midColPost"><h2 class="postTitle"><?php echo "Breaking News" ?></h2>
<ul>
<?php $latest = get_posts('numberposts=15&cat='.$theme_options["breakingNewsCatID"]); foreach( $latest as $post ): ?>
<li><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_time('H:i') ?>"><?php the_title(); ?></a></li>
<?php endforeach ?>
</ul></div>
<!-- End of entries on middle column on the right side of Featured section -->

You are done! Let me know if you find any difficulty, by commenting below.

Leave a Reply

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

Translate

Print

Print This Post Print This Post

Search

OneNews WordPress ThemesTheme Forest - Quality Themes, Great Support
Blogohblog.com - Premium WordPress ThemesElegant Wordpress Themes
WooThemes - WordPress themes for everyone

Community

Login with Facebook:
Last visitors
Powered by Sociable!

Related Post

Recently Commented

Photo Gallery

Log in
/ Advanced NewsPaper by Gabfire Themes
Education and Training Blogs - BlogCatalog Blog Directory