Most blogs these days have this special section in the front page that shows either a particular article in their site or perhaps any latest announcements. Wouldn’t it be great for your blog to have its own “Featured” section, showcasing a part of your blog’s content? Assuming that you are using WordPress, this article will teach you all about the Feature section, from the benefits of having one and how to add one to your blog.
The Purpose of a Feature Section
The purpose of a feature section is that it can show off the best things about the blog to gain the reader’s attention. The author can choose to place anything in the feature section, from a random post in the blog, to photos and videos, or perhaps use it to post announcements and updates. The feature section is designed to make it so that the reader will see it. This kind of section can be quite useful for the blog and help keep interest in it.
Where to place the Feature Section
You can choose to place the feature section anywhere you want in the site; even the sidebar, if you so desire, but the best place for the feature section would be the home page, where it would be the first thing the visitor would see when he or she first enters the blog.
Designing the Feature Section
You can place the feature section anywhere by editing the corresponding template files. For example, if you want it in the home page, you will have to edit index.php; if you want it in the sidebar, you will need to edit sidebar.php. In any case, to create a Feature section for the page of your choice, simply open the template with Notepad, then paste in the following:
<div class=”featured”>*feature section name goes here*</div>
Save the file as featured.php and upload it into your theme folder and into the same location where index.php is on.
Calling in the Feature Section
Suppose you want to place the feature section into someplace like say, the homepage. To do this, open index.php and look for the following lines:
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
Once you find the above lines, place this code directly above them:
<?php if (!is_paged()) include_once(TEMPLATEPATH.’/featured.php’); ?>
And that is how to call in the feature section to the home page. If you want to call it in to a different area, like the sidebar, simply open the corresponding template file, like sidebar.php, and do the same thing listed above.
Coding and styling the Feature Section
Now that calling in the Feature Section is done, you can customize it the way you want it to work and look. Suppose you want to use the feature section for announcements. For this, write what you want in a unique class in the featured.php file and including the corresponding style in the style.php file. For example, the featured.php file should look like this:
<div class=”static-feature”>*announcement goes here*</div>
And the style should look something like this, where * is your desired number for the width, ** is you’re desired number for the height, and n is for the background:
That is how you make announcements with the Feature Section. Now, suppose you want to show a post from a particular category with it. To do just that, you will need the WordPress PostList plugin. Install the plugin and then select the category from which you want to show the post from for the Feature Section. You can also choose the number of posts to show, and even set the section to automatically update itself. In any case, once you are done making your changes, call in the list with:
Haword Roze is a University Lecturer and Editor of E20-002 Test. He is researching on University Programs since last three years. You can find E20-005 Test Questions Exam Papers Jobs from Top Universities and Colleges from all over the world.
Share this post on your Favorite Social Network
Latest posts by Loren (see all)
- TheTeachingBox.com is Sold - November 20, 2013
- ExitTicket Student Response System - November 17, 2013
- Achieve Career Success with A Right Subject Field: 5 How-To Tips! - November 13, 2013
WelcomeThe Teaching Box is a portal dedicated to Educational Endeavors. Here you will find my collection of tools and resources. They have been carefully placed into this online virtual teaching box for your use and enjoyment. Come explore the box with me.