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.

 
Add a comment

Comments (21)

  1. Ben Saturday - 21 / 08 / 2010 Reply
    hello Tom, thanks for the write up on estore. Btw, i wonder what plugin you use for retweet and facebook share button? Thanks in advance!
    • Tom McGuire Sunday - 22 / 08 / 2010 Reply
      I am using the 'Tweet This' plugin Richard X. Thripp. It works perfect however the plugin settings page is a little buggy. Sometimes the settings don't stick. So once you get them set. No touch!
  2. SandraM Thursday - 23 / 09 / 2010 Reply
    Hi Tom I've just installed estore and followed your write up. Worked. Yeii! But, how can I get rid of "Product Information" thing? Thanks a lot, anyway. Your sharing was already a huge help. Cheers
    • Tom McGuire Thursday - 23 / 09 / 2010 Reply
      Be sure to download the files in this tutorial. There is a download link above. In there is a template file which you can use that is a clean layout and does not contain the product information block.
  3. SandraM Thursday - 23 / 09 / 2010 Reply
    Tom, I did it. Followed you every step. But silly me did a mistake with the ID number. Everything now work just perfect. Love it. Thanks a lot.
  4. Bert Thursday - 14 / 10 / 2010 Reply
    Hi Tom, thanks for sharing this. I'm trying to install the blog into estore but am a lil' confused with some instructions. How do i tell Wordpress to point any post associated with the 'blog' (id#) to the special template file? Is it somewhere in the code i have to tweak or is it the theme options page? "Page Links To": I set my permalinks structure to "/%category%/%postname%/". Does that matter? How should i enter the category URL in this case? Thanks! ;b
  5. Pinwire Friday - 15 / 10 / 2010 Reply
    @Bert: Be sure you have the Admin ID plugin mentioned above installed and activated which gives you the ID number of category. Then once you get the ID number you create the single-#.php file which will load in place of the default one ever time you view a post from that category? Hope that helps.
  6. Tom Sunday - 17 / 10 / 2010 Reply
    Anyone able to link to an actual implementation of this to give us an idea of what it actually looks like?
  7. Pinwire Monday - 18 / 10 / 2010 Reply
    Yep. You can see it setup here at a temporary domain. http://www.tobeoneaskone.com/
  8. Aimee McDaniel Saturday - 27 / 11 / 2010 Reply
    Thank you for this post - it was great! I admit I had to re-read it about 4 times before I finally got it right :) But, it's great now. Thanks a million!
  9. AimeeM Monday - 29 / 11 / 2010 Reply
    So I had this working beautifully - then, I decided that I would change the wordpress install to a different directory on my server. Now... this doesn't work. I have checked everything a gazillion times and NOTHING! When you have the URL point to /category/blog, I originally had it as anotherFolder/category/blog. Now that everything is in the root directory, it still won't link any blog category post to the blog page. Any suggestions??
  10. Tom Monday - 29 / 11 / 2010 Reply
    I would recommend re-saving your permalink settings and then also check any 301 redirection plugins you may be running that may be keeping track of your old permalinks.
  11. Tom Monday - 29 / 11 / 2010 Reply
    Actually...I justd checked your site and when I goto http://hcgthinsolution.com/category/blog/ it works fine. Did you just fix it?
  12. AimeeM Monday - 29 / 11 / 2010 Reply
    AWESOME!!! Thank you so much! Now, is there anyway to get them to show up on the homepage in the lower section?
  13. AimeeM Monday - 29 / 11 / 2010 Reply
    Yeah, I probably fixed it just before you checked it. :)
  14. Tom Monday - 29 / 11 / 2010 Reply
    I believe that is a setting in the theme options. You need to turn on your category in the General Settings > Home, Page ePanel settings.
  15. Khoirul Wednesday - 05 / 01 / 2011 Reply
    Hi toms. Nice article. Could you show me how to add comment on estore theme?
  16. Vinoth Kannan Thursday - 05 / 05 / 2011 Reply
    Thank you man. It Helped me lots
  17. Shea Saturday - 16 / 07 / 2011 Reply
    Thank you! This worked perfect on the first attempt. I can't say, "Thank you" enough I have looking for a way to add comments.
  18. Jaesi Monday - 20 / 02 / 2012 Reply
    When I click on the post now, it has the new template except the thumbnail picture doesn't show. Well that is what i would prefer, but what does appear there is an empty box. How do I either get my thumbnails to show in the post or just get rid of the empty box but still be able to have a thumbnail for when someone does a category search or something.
    • Pinwire Monday - 20 / 02 / 2012 Reply
      Hmm... been awhile since I used the theme. But I think you need to have a featured image included or the theme may take the first image int he post and use it. Give it a shot.

Add a comment

Pinwire @ tumblr

    http://pinwirecom.tumblr.com/post/99399753457http://pinwirecom.tumblr.com/post/99056819727http://pinwirecom.tumblr.com/post/98488475777http://pinwirecom.tumblr.com/post/94745420282http://pinwirecom.tumblr.com/post/92737496842http://pinwirecom.tumblr.com/post/88505613492