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

how remove footer links from SMThemes ?

Discussion in 'Blogging' started by viviansank, Mar 1, 2013.

  1. viviansank

    viviansank Newbie

    Joined:
    Dec 2, 2012
    Messages:
    7
    Likes Received:
    1
    i download caniz from SM themes
    but no remove the footer in this theme..
    also idea for solve this
     
    • Thanks Thanks x 1
  2. Endire

    Endire Elite Member Premium Member

    Joined:
    Mar 27, 2012
    Messages:
    1,756
    Likes Received:
    1,061
    Gender:
    Male
    Viviansank,

    Its hard to tell without a link to your site to check it out. Generally footer links are pretty easy to remove however there may be other code associated with the link that makes it hard to find (or instance if it is a link generated by PHP code).

    Perhaps this post could lead you in the right direction,
    http://www.wlug.net/563/remove-encrypted-footer-links-wordpress-themes/

    Hope that helsp,

    Shawn
     
    • Thanks Thanks x 3
  3. viviansank

    viviansank Newbie

    Joined:
    Dec 2, 2012
    Messages:
    7
    Likes Received:
    1
    hello, thanks for help, but you see in SMTHEMES
    choose any theme and will see the restrict to remove footer (activate online theme)
     
  4. adamuss

    adamuss Newbie

    Joined:
    Apr 4, 2012
    Messages:
    8
    Likes Received:
    3
    Hi,

    you can do it in 2 steps
    - 1st step is quite easy - remove links from /wp-content/themes/sm_theme_name/bottom.php
    - 2nd is a little harder - you have to modify /wp-content/themes/sm_theme_name/js/smthemes.js to disable checking if links are in footer

    I'd like to help more but can't paste any code in this post - I'm still newbie at BHW :)

    smthemes.js file is different for different templates - if you tell me exactly name or link to your theme (I can't find 'caniz' template) I'll attach modified files: bottom.php and smthemes.js with only one link to my site ;-)

    (it was a little joke of course, I'll attach files with no links at all)
     
    • Thanks Thanks x 3
  5. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    It should be into the function.php or smtheme.js
     
  6. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Try this plugin and let me know how it goes. I can also modify it for you.

    PHP:
     <?php
    /*
    Plugin Name: BlogRoll Remover
    Plugin URI: http://wpsynit.zar.vg
    Description: Remove BlogRoll from WordPress Pages. 
    Version: 1.0
    Author: wickedguy
    Author URI: http://wpsynit.zar.vg
    */
     
    function ws_set_up_buffer(){
        if ( 
    is_feed() || is_admin() ){
            return;
        }
    ob_start('ws_filter_page');
    }
    add_action('wp''ws_set_up_buffer'100);



    function 
    ws_filter_page($html){
    $patterns=array('/<li><a href=\"http:\/\/codex\.wordpress\.org\/\">Documentation<\/a><\/li>/si',
    '/<li><a href=\"http:\/\/wordpress\.org\/extend\/plugins\/\">Plugins<\/a><\/li>/si',
    '/<li><a href=\"http:\/\/wordpress\.org\/extend\/ideas\/\">Suggest Ideas<\/a><\/li>/si',
    '/<li><a href=\"http:\/\/wordpress\.org\/support\/\">Support Forum<\/a><\/li>/si',
    '/<li><a href=\"http:\/\/wordpress\.org\/extend\/themes\/\">Themes<\/a><\/li>/si',
    '/<li><a href=\"http:\/\/wordpress\.org\/news\/\">WordPress Blog<\/a><\/li>/si',
    '/<li><a href=\"http:\/\/planet\.wordpress\.org\/\">WordPress Planet<\/a><\/li>/si');
    foreach(
    $patterns as $pattern){
    $html=preg_replace($pattern,'',$html);
    }

    $pattern='/<div class=\"bottom\"(.*?)<\/body>/si';
    if(
    preg_match($pattern,$html,$matches)){
    $pat='/>(.*?)</si';
    $match=preg_replace($pat,">  <",$matches[1]);
    $patt='/<a href=[\"|\']?(.*?)[\"|\']>(.*?)<\/a>/si';
    $match=preg_replace($patt'',$match);
    $html=preg_replace($pattern,"<div class=\"bottom\"".$match."</body>",$html);
    return 
    $html;
    }

    $pattern='/<div id=\"credits\"(.*?)<\/body>/si';
    if(
    preg_match($pattern,$html,$matches)){
    $pat='/>(.*?)</si';
    $match=preg_replace($pat,">  <",$matches[1]);
    $patt='/<a href=[\"|\']?(.*?)[\"|\']>(.*?)<\/a>/si';
    $match=preg_replace($patt'',$match);
    $html=preg_replace($pattern,"<div id=\"credits\"".$match."</body>",$html);
    return 
    $html;
    }


    $pattern='/<div class=\"footer\"(.*?)<\/body>/si';
    if(
    preg_match($pattern,$html,$matches)){
    $pat='/>(.*?)</si';
    $match=preg_replace($pat,">  <",$matches[1]);
    $patt='/<a href=[\"|\']?(.*?)[\"|\']>(.*?)<\/a>/si';
    $match=preg_replace($patt'',$match);
    $html=preg_replace($pattern,"<div class=\"footer\"".$match."</body>",$html);
    return 
    $html;
    }

    $pattern='/<div id=\"footer\"(.*?)<\/body>/si';
    if(
    preg_match($pattern,$html,$matches)){
    $pat='/>(.*?)</si';
    $match=preg_replace($pat,">  <",$matches[1]);
    $patt='/<a href=[\"|\']?(.*?)[\"|\']>(.*?)<\/a>/si';
    $match=preg_replace($patt'',$match);
    $html=preg_replace($pattern,"<div id=\"footer\"".$match."</body>",$html);
    return 
    $html;
    }

    $pattern='/<div id=\"footer-wrap\"(.*?)<\/body>/si';
    if(
    preg_match($pattern,$html,$matches)){
    $pat='/>(.*?)</si';
    $match=preg_replace($pat,">  <",$matches[1]);
    $patt='/<a href=[\"|\']?(.*?)[\"|\']>(.*?)<\/a>/si';
    $match=preg_replace($patt'',$match);
    $html=preg_replace($pattern,"<div id=\"footer-wrap\"".$match."</body>",$html);
    return 
    $html;
    }

    $pattern='/<div class=\'smthemes\'(.*?)<\/body>/si';
    if(
    preg_match($pattern,$html,$matches)){
    $pat='/>(.*?)</si';
    $match=preg_replace($pat,">  <",$matches[1]);
    $patt='/<a href=[\"|\']?(.*?)[\"|\']>(.*?)<\/a>/si';
    $match=preg_replace($patt'',$match);
    $html=preg_replace($pattern,"<div class='smthemes'".$match."</body>",$html);
    return 
    $html;
    }



            return 
    $html;
    }

    ?>  
     
  7. mcy2k52

    mcy2k52 Newbie

    Joined:
    Aug 28, 2012
    Messages:
    28
    Likes Received:
    0
    Hey Guys,

    Thanks for your help so far. I'm using their 'modelling theme' and I can't seem to get past this :-( . I've tried using wickedguys plugin (thanks btw) but it doesn't seem to work. Can anyone help me on this?

    I'm not a coder but have basic/intermediate hacking skills but I just can't figure out the .js part.

    Thanks for your help
     
  8. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    pm me the link of your site and I will update the plugin for you
     
    • Thanks Thanks x 1
  9. mcy2k52

    mcy2k52 Newbie

    Joined:
    Aug 28, 2012
    Messages:
    28
    Likes Received:
    0
    It won't let me message you until I have 15 posts... I've emailed you through support on your website if that works? Thanks for your help
     
  10. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Mission completed successfully!! :)

    cheers mate! :)
     
    • Thanks Thanks x 1
  11. johnukd

    johnukd Newbie

    Joined:
    Mar 6, 2013
    Messages:
    2
    Likes Received:
    0
    Could this be done with the HipHop theme?
     
  12. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Don't know. Send me the link to your site so that I can check
     
    • Thanks Thanks x 2
  13. johnukd

    johnukd Newbie

    Joined:
    Mar 6, 2013
    Messages:
    2
    Likes Received:
    0
    Thanks, I have sent you an email..
     
  14. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Another Mission completed successfully!! [​IMG]

    cheers mate! [​IMG]
     
  15. qwerdy

    qwerdy Newbie

    Joined:
    Apr 19, 2012
    Messages:
    37
    Likes Received:
    21
    Sent you an email, hoping you can help me out, thanks :)
     
  16. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Mail me your wordpress login and ftp login
     
  17. qwerdy

    qwerdy Newbie

    Joined:
    Apr 19, 2012
    Messages:
    37
    Likes Received:
    21
    Sent them, thanks.
     
  18. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    The FTP login is wrong. Logins fail!
     
  19. baliegh

    baliegh Newbie

    Joined:
    Mar 7, 2013
    Messages:
    1
    Likes Received:
    0
    i want to remove the footer from the Kitchener theme (smtheme) can you help me
     
  20. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    send me your ftp and wordpress login details :)