1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

[FREE] Wordpress Silo Widget Plugin

Discussion in 'Black Hat SEO' started by phpbuilt, Sep 5, 2011.

  1. phpbuilt

    phpbuilt Jr. VIP Jr. VIP

    Joined:
    May 16, 2011
    Messages:
    1,650
    Likes Received:
    5,208
    Occupation:
    $ from websites I own.
    Location:
    putting monkeys in paypal
    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:

    [​IMG]

    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.
     
    • Thanks Thanks x 33
    Last edited: Sep 5, 2011
  2. deki33

    deki33 Jr. VIP Jr. VIP Premium Member

    Joined:
    Oct 9, 2009
    Messages:
    4,596
    Likes Received:
    763
    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 ?
     
  3. phpbuilt

    phpbuilt Jr. VIP Jr. VIP

    Joined:
    May 16, 2011
    Messages:
    1,650
    Likes Received:
    5,208
    Occupation:
    $ from websites I own.
    Location:
    putting monkeys in paypal
    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.
     
    • Thanks Thanks x 1
  4. christianbed

    christianbed Jr. VIP Jr. VIP Premium Member

    Joined:
    Aug 17, 2011
    Messages:
    1,346
    Likes Received:
    882
    Location:
    alert("Make Money")
    Home Page:
    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.
     
  5. mpspringer

    mpspringer Newbie

    Joined:
    Oct 27, 2011
    Messages:
    24
    Likes Received:
    5
    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??
     
  6. hekasis

    hekasis Junior Member

    Joined:
    Mar 17, 2011
    Messages:
    140
    Likes Received:
    28
    Location:
    Bangkok
    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



     
  7. DeuceP

    DeuceP Newbie

    Joined:
    Dec 16, 2009
    Messages:
    43
    Likes Received:
    13
    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.
     
  8. Daggs1

    Daggs1 Newbie

    Joined:
    Oct 25, 2012
    Messages:
    12
    Likes Received:
    3
    I cant get it to work with Socretes 3.0. Great share though.
     
  9. johnny6667

    johnny6667 Regular Member

    Joined:
    Jan 12, 2013
    Messages:
    232
    Likes Received:
    53
    Gender:
    Male
    Occupation:
    SEO, PPC, FB Ads
    Location:
    Australia
    Home Page:
    A great plug in thanks for that! + rep however is there a way to exclude categories with this plug in?
    Thanks again
     
  10. nyrvana

    nyrvana Newbie

    Joined:
    Jan 3, 2013
    Messages:
    16
    Likes Received:
    3
    Thanks for the info
     
  11. HeadBone

    HeadBone Registered Member

    Joined:
    Jan 9, 2010
    Messages:
    57
    Likes Received:
    82
    Occupation:
    I have 3...
    Location:
    Most of the time it's Earth..but who knows...
    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
     
  12. kinjgr

    kinjgr Newbie

    Joined:
    Sep 26, 2013
    Messages:
    3
    Likes Received:
    0
    i also get the error message, do you have the solution for the error? thx for the share...
     
  13. royserpa

    royserpa Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 28, 2011
    Messages:
    4,650
    Likes Received:
    3,494
    Gender:
    Male
    Occupation:
    Negative Options aka Rebills!
    Location:
    Royserpa
    Home Page:
    Great plugin pal!
    Though, i kinda disagree with your silo being with less than 50 articles.
     
  14. jayrat14

    jayrat14 Senior Member

    Joined:
    Feb 6, 2011
    Messages:
    1,101
    Likes Received:
    134
    Location:
    BHW on Mars!
    Thank you for this! The plugin should be great..
     
  15. StrixMedia

    StrixMedia Jr. VIP Jr. VIP Premium Member

    Joined:
    Jul 25, 2013
    Messages:
    2,073
    Likes Received:
    264
    Gender:
    Male
    Location:
    In a competitive world