Essentials:

Add Blog Capability to eStore template

eStore Theme Download

There is a fantastic new template from Elegant Themes called eStore which has some very nice pre styled WordPress ecommerce plug in styling.

There are only two drawbacks to this template that I have found to be more of an annoyance than bugs.

Firstly the template doesn’t offer styled integration of any eCommerce plugin’s that makes use of a shipping calculator. And as any person who does business via a website will tell you. You can lose your shirt on improper shipping calculations. This article isn’t going to attempt to solve this issue.

I will instead be focusing on the other minor issue being that the template doesn’t offer any way to ‘Blog’ thus making your SEO opportunities bleak at best.

Here are the steps that I took to get blogging working with the eStore template for WordPress.

Be sure to backup your website and data.

Firstly you will need to install and activate these two plugin’s:
Reveal IDs for WP Admin
Page Links To

The first thing you need to do is to create a post category which you will associate your blog posts with. In this example I am using ‘blog’ as my category. I’m not going to tell you how to make a post category; you will have to learn that on your own.

After you make your new post category you must make note of the category ID which you can find on the category page in the dashboard. We will use this ID later.

Then navigate to the eStore Theme Options in Dashboard > Appearance menu. Then General Settings > Homepage Tab. Then disable your new blog category at the bottom of the page in the ‘Exclude categories from homepage recent posts’ block.

Next download my blog post template file and place it into the eStore template folder. DOWNLOAD HERE. Please note. The code in this template is about as ugly as they get. I encourage someone else to clean it up and re-post. Replace the ‘yourid’ in the filename with the ID number of your blog post category.

The next step is to tell WordPress that any post associated with the ‘blog’ (id #) to use your special template file. After renaming my single-yourid.php upload it to the server.

Next create a new page. This page will be the menu link to your blog category. In my case I made the page name ‘Blog.’ At the bottom of the ‘Add New Page’ page you will see a new option area called ‘Page Links To.’ Enter the category URL in the ‘Point to this URL field and hit publish. In my example I entered /category/blog

The final step is to make a small modification to your functions.php file. All you need to do is add this one line of code just before the closing ?> tag, or anywhere near the bottom of the file.

Again…BACKUP YOUR FILES!

code    
add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) {
if ( file_exists(TEMPLATEPATH . "/single-{$cat->term_id}.php") ) return TEMPLATEPATH . "/single-{$cat->term_id}.php"; }
return $t;' ));

Upload the new functions.php and visit your site. There should be a blog link in the main menu which links to a list of your blogs.

Things to consider. The category page is still determined by the eStore template file. And each post still requires a featured image.

Search with these terms to find more content:

Terms: allow6el, column2mb, insidehqo, jarbqj, positions6q  
Add a comment

Comments (21)

    Error thrown

    Call to undefined function ereg()