Update: 26-08-08 - Bhavesh has dropped me an email informing me that there will be a steady version for download very soon.

Downloaded a Free Premium Theme for my other blog which I am in the midst of re-structuring to focus on Doing Business Online. It used to be a personal rant blog and it was my first blog in a self hosted server. The theme I downloaded was code named the Newsweek WordPress Theme by PremiumThemes dot net. I am happy with the theme, but I wasn’t happy with the download being put up by the owner.

I do not know if R.Bhavesh (the owner) realized it, but the version he put up for download is, I suspect, the demo version instead of the full working version. When I activated the theme,

  • The Sidebar widgets was not available because the Functions php was not included in the folder.
  • The Featured Post in the front page contained a static post and image used for showcasing purposes.
  • The division class for the Ad Blocks were not properly inserted.

All these don’t seemed to be coding “mistakes” but more like done on purpose for demonstrating the theme so he do not need to do a “real” post for the Demo page. I am saying this because it is an extremely smooth running theme once I placed in all the “missing” codes.

First, the dynamic sidebar which supports widgets. This tip might be useful for those who has a theme that has not been widgetized, though I believe most themes nowadays comes with sidebar widgets as default. The small piece of code to make the sidebar dynamic is

<?php if ( function_exists(’dynamic_sidebar’) && dynamic_sidebar(1) ) : else : ?>

If you have 2 sidebars then you have to specify the sidebar number at the end of the code inside the barckets. In this example,  this will be inserted into sidebar number one, whichever sidebar you prefer so when you open your Widgets page in your Dashboard, you will know what widgets goes where.  It should be placed in your sidebar php where you want the dynamic sidebar to start.

The codes were present in the sidebars of the Newsweek Theme, BUT, to make the sidebars dynamic, we must have a Functions php file to call up the function and that was missing from the download folder. Fortunately, that was not a big problem. All we have to do is to create one.  Open your notepad and type in this codes

<?php
if ( function_exists(’register_sidebar’) )
register_sidebars(2);
?>

The 2 stands for 2 sidebars. Save it as Function with a php extention so it becomes functions php.  Upload this file to your server where the theme’s folder is located. Once that is done, you should be able to use the sidebar widgets.

Now, the Featured Article excerpt in the front page of the Newsweek Theme. There is am image included which I think is suppose to be inserted via the Custom Filed as in most magazine style theme. This however has been altered to make a static post appear together with am image from the theme’s image folder. To make the “Featured Article” excert work and include an image of my choice, I inserted these codes so I can use the Custom Fields function available but rarely used in WordPress just after the Featured Article  <div class=”listings”> in the Index php,

<?php if(get_post_meta($post->ID, “thumb”, true)) {
$size = getimagesize($_SERVER["/wp-content/uploads"].get_post_meta($post->ID, “thumb”, true)); ?>
<img src=”<?php echo get_post_meta($post->ID, “thumb”, true); ?>” alt=”" width=”<?php echo $size[0]; ?>” height=”<?php echo $size[1]; ?>” />
<?php } ?>

The word “thumb” will be the custom fields key and the location where you uploaded your image will be the value. Normally for WordPress the default location will be www.yourdomian/wp-content/uploads/date/filename.  So all you have to do if you want to add in a custom image for the Featured Post excerpt in the Front Page is to upload the image in your post editor, copy the URL where it has been uploaded and paste it in the Value box in the Custom Fields option just below your post editor. Remeber also to type in the “key” which in this case is “thumb” as indicated in the codes above.

To specify the category which you want appearing as featured post, add in this line of codes just beneath what you have inserted just now.

<?php if ( in_category(’123′) ) ?>

Replace the number 123 with your own category number, obtained by going to your Categories Page and hovering your mouse over that category. You can see the category number at your browsers bottom bar.

Then of course you will need to show the Post Title, the Dates and so on. All this is achieved by adding these jumble of codes.

<h2 id=”post-<?php the_ID(); ?>”><a href=”<?php the_permalink() ?>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”>
<?php the_title(); ?>
</a></h2>
<?php the_excerpt(); ?>

<a href=”<?php the_permalink(); ?>” class=”readmore”>Read More >></a>

Paste these codes all in the same place one after another should make the “Featured Article” excerpt in the front page of the Newsweek WordPress Theme work nicely. You can see a working version in my Homebased Business blog. Sorry, I have moved this blog and it is not viewable anymore. :-)

Download The Newsweek WordPress Theme

Related

Where To Look For High Quality WordPress Themes
Beautiful WordPress Themes For Free
3 Column Neoclassical Theme by Chris Pearson
The Thesis WordPress Theme By Chris Pearson
Latest Professional Looking WordPress Theme
Win A Premium WordPress Theme From Unique Blog Design
Optimize Your WordPress Themes For Free
A Sexy, Hip And Smashing 3 Column WordPress Theme For Christmas