[FREE] Wordpress Silo Widget Plugin

phpbuilt

Elite Member
Joined
May 16, 2011
Messages
1,671
Reaction score
5,351
There is another thread on BHW right now where everyone is talking about their favorite plugins. One of my most favorite is one I wrote myself. It is a very simple widget that posts categories in a siloed way.

What is siloing?

Here are some others talking about the subject:

http://www.wolf-howl.com/seo/how-to-silo-your-website/
http://www.shimonsandler.com/advanced-seo-siloing-content/
http://www.seoboy.com/the-importance-of-using-silos-in-your-seo-strategy/

Lets say you own an automotive website. Which would you rather have linking to you, 10 websites that are all about automotive, or 10 about random subjects like making money online or health niches, etc? Everyone should say they want automotive sites linking -- because that is more relevant to your niche.

It works exactly the same with your internal pages. Did you know that your pages can rank really well based off nothing but your internal linking structure? The goal then becomes to have your most related pages on your website linking to only your other most related pages.

Assume for a moment that you are trying to make an authority health-related website. You are starting with 3 main subjects, losing weight, yoga and biking (but eventually you may have 30 or more). To properly silo your website, all of your losing weight pages will only interlink between other losing weight pages. All your yoga will only interlink with other yoga. All your biking will only interlink with other biking. This will make it as though your domain has 3 different websites contained within it, where the only connections between the 3 are 1 link pointing to the root category.

This is NOT the way it works in wordpress by default. By default, wordpress will link to all categories and subcategories on all pages. The theory with siloing is that doing this dilutes your internal linking structure.

If you have a large website (100 or more posts) and you implement siloing, theoretically you will be cutting down internal linking by over 50% or more, and the remaining links that exist will be more powerful and relevant.

Here is an image showing how this would work:

6117524737_ee6de3604e_z.jpg


Ok so now you know what siloing is. Now, how do you do it? I looked all over for a decent siloing plugin but I couldn't find one, so I wrote it myself.

PHP:
<?php
/*
Plugin Name: Silo Categories
Plugin URI: http://seowargames.com/
Description: Categories Siloed
Author: phpbuilt
Version: 1
Author URI: http://seowargames.com/
*/

function siloCategories()
{
    ob_start();
    if (is_category()) {
        $cat = get_query_var('cat');
    }
    if (is_single()) {
        $category = get_the_category();
        $cat = $category->cat_ID;
        $category = get_the_category();
        $cat = $category[0]->cat_ID;
    }
    if(is_single() || is_category()){
        $this_category = get_category_parents($cat,false,"^");
        $this_categoryE = explode("^",$this_category);
        $mycategory = $this_categoryE[0];
        $id = get_cat_id($this_categoryE[0]); 
        $cat = $id;
        $this_category = wp_list_categories('hide_empty=1&hierarchical=true&orderby=name&show_count=0&title_li=&use_desc_for_title=0&child_of='.$cat."&echo=0");
        if($this_category !='<li>No categories</li>')
        {
         echo "<div id=\"button\"><h3>$mycategory Related Categories</h3>"; 
         echo '<ul>'.$this_category.'</ul></div>'; 
        }
    }
    $this_category = wp_list_categories('hide_empty=1&hierarchical=true&depth=1&orderby=name&show_count=0&title_li=&use_desc_for_title=0'."&echo=0");
    if($this_category !='<li>No categories</li>')
    {
     echo "<div id=\"button\"><h3>Main Categories</h3>"; 
     echo '<ul>'.$this_category.'</ul></div>'; 
    }
    $col = ob_get_contents();
    ob_end_clean();

    global $arr;
    foreach($arr AS $key => $value){
        $col = str_replace($value,$key,$col);
    }
    echo $col;
}
 
function widget_mySilo($args) {
  extract($args);
//  echo $before_widget;
  siloCategories();
//  echo $after_widget;
}
 
function mySilo_init()
{
  register_sidebar_widget(__('Silo Categories'), 'widget_mySilo');
}
add_action("plugins_loaded", "mySilo_init");
?>
In your plugins folder, make a folder named "silo". Paste this file inside, call it silo-categories.php.

Next, activate the plugin. It then becomes a widget. Go to widgets, and drag and drop the "silo" widget to wherever your "categories" widget is, and delete your "categories" widget from your sidebar. The silo widget will function just like your category widget, only siloed as explained above.

I'd like to emphasize that siloing is only for large websites. If you have 50 or less pages, siloing is not going to do you any good. Let me know if you have any questions.
 
Last edited:
All my categories are set as top categories without subcategories.
Does using this require changing it to subcategories or plugin can recognize similar categories by keyword matching and group them ?
 
All my categories are set as top categories without subcategories.
Does using this require changing it to subcategories or plugin can recognize similar categories by keyword matching and group them ?

Yes it would require that. But I wouldn't recommend changing your directory structure on an established and profitable website. Personally I'd only do this on a brand new website going forward.

Creating subcategories underneath root categories is how the plugin segregates one siloed section from another.
 
Hey man...thanks so much for this. Not sure how much it will help my site at this point...still working to the goal of 100 pgs, but it taught me where plugins come from...so rep given for teaching me something useful.
 
Thanks PHPBuilt for taking the time to write the code and generously share it!

Would this plugin work with Wordpress Multisite install? Compatible with Thesis?

I've uploaded the folder/file up into the Plugins folder. For some reason, the admin does not display nor recognize the "Silo" plugin to activate it??
 
Hi and thanks for the plugin it is very handy. I am getting this error on my blog and wonder if it is easy to fix.

Warning: Invalid argument supplied for foreach() in /home/XXXXXXXX/plugins/silo/silo-categories.php on line 46



 
Thanks for this! The plugin is great and the info you linked to finally gave me a clear idea of what I need to do to structure my site. Once I hit 50 posts across multiple topics the regular "blog" format got a bit chaotic.
 
I cant get it to work with Socretes 3.0. Great share though.
 
A great plug in thanks for that! + rep however is there a way to exclude categories with this plug in?
Thanks again
 
Thanks for the share. I did get an error and will have a look here to see what I can do to fix it. The theme is socrates, the links show but has this error on top of the links.
Warning: Invalid argument supplied for foreach() in /home/user/public_html/blank.com/wp-content/plugins/silo/silo-categories.php on line 46
 
i also get the error message, do you have the solution for the error? thx for the share...
 
Great plugin pal!
Though, i kinda disagree with your silo being with less than 50 articles.
 
Back
Top