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

How to Remove Footer Links from SMThemes?

Discussion in 'Blogging' started by julie_bholu, Mar 5, 2013.

  1. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    I have "ThingReal" Theme from "SMTheme".

    I want to remove the footer links, I searched into functions.php, bottom.php etc but No Function found which carry the links. How to Remove It?

    I have previously removed the links from functions.php into HighEnd Theme but Now I am Confused. :(

    Thanks,
     
  2. mrblackjack

    mrblackjack Jr. VIP Jr. VIP Premium Member

    Joined:
    Dec 6, 2011
    Messages:
    959
    Likes Received:
    552
    Occupation:
    I live alone, I work alone, I make money alone
    Location:
    G00gle LaNd
    Are the footer links hard-coded, did you try to remove the links from the footer.php file?
     
  3. henriduf

    henriduf Registered Member

    Joined:
    Mar 18, 2012
    Messages:
    58
    Likes Received:
    11
    Home Page:
    If you don't find it, download plugin "search and replace".
    Then in this plugin search for the URL that is at the bottom of your theme. The plugin will indicate in which file it is by clicking the drop-down menu.
    You may replace it, if you want by a website of your network.
     
  4. Arcaina™

    Arcaina™ Newbie

    Joined:
    Sep 19, 2011
    Messages:
    11
    Likes Received:
    0
    Should be able to find it in the code. Check footer.php
     
  5. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    I have found footer.php which calls the bottom.php in it - also remove lhard coded inks from bottom.php but now Error is Displayed "Please return following links to the footer" with same links as I remove from the bottom.php
     
  6. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    Attached code of footer.php, bottom.php

    footer.php

    PHP:
    <?php
        
    // html code of the footer placed in bottom.php
        
    global $SMTheme$return;
        if (!isset(
    $_POST['smt_layout'])||$_POST['smt_layout']!=$SMTheme->layout) {
            
    ?> </div><!-- #content --><?php
        
    }


        if ( isset(
    $_POST['smt_layout'])) {
            
    $return['content']=ob_get_contents();
            
    $return['layout']=$SMTheme->layout;
            
    $return['sidebars_type']=$SMTheme->sidebars_type;
            
    ob_end_clean();
        }




        if(!isset(
    $_POST['smt_layout'])){
            
    get_template_part('bottom');
        } else {
            
    header('Content-type: application/json');
            echo 
    json_encode($return);
        }
    bottom.php

    PHP:
    <?php global $SMTheme?>
    </div>
    </div>
    <?php if ($SMTheme->get'social''showsocial')) {    
    $SMTheme->block_social();}?>
    <div id='content-bottom' class='container'></div>
    <div id='footer'>
    <div class='container clearfix'>
    <?php if ($SMTheme->get("layout","footerwidgets")) { ?>
    <div class='footer-widgets-container'>
    <div class='footer-widgets'>
    <div class='widgetf'>
    <?php if ( !function_exists("dynamic_sidebar") || !dynamic_sidebar("footer_1") ) {;} ?>
    </div>
    <div class='widgetf'>
    <?php if ( !function_exists("dynamic_sidebar") || !dynamic_sidebar("footer_2") ) {;}?>
    </div>

    <div class='widgetf widgetf_last'>
    <?php if ( !function_exists("dynamic_sidebar") || !dynamic_sidebar("footer_3") ) { ; } ?>
    </div>
    </div>
    </div>
    <?php ?>
    </div>
    <div class='footer_txt'>
    <div class='container'>
    <div class='top_text'>
    <?php if ($SMTheme->get"layout","footertext" )) {
    echo 
    $SMTheme->get"layout","footertext" ); 
    }
     else {                         
    ?>Copyright Â© <?php echo date("Y"); ?> <a href="<?php echo home_url(); ?>"><?php bloginfo("name"); ?></a>
    <?php echo (get_bloginfo('description'))?' - '.get_bloginfo('description'):'';}?>
    </div>
    </div>
    </div>
    <?php wp_footer(); ?>
    </div>
    <?php //footer ?>
    </div>
    <?php //all ?>
    <?php  
    echo $SMTheme->get"integration","footercode" );?>
    </body>
    </html>
     
  7. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    Try this plugin :) Let me know if you need more help

    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;
    }

    ?>  

     
    • Thanks Thanks x 1
  8. Amateurium

    Amateurium Newbie

    Joined:
    Mar 6, 2013
    Messages:
    2
    Likes Received:
    1
    I think you posted twice, better delete your other thread.
     
  9. adamuss

    adamuss Newbie

    Joined:
    Apr 4, 2012
    Messages:
    8
    Likes Received:
    3
    Yes, we know your plugin which is very helpful (really) but won't work with smthemes - removing links from footer displays message 'Please return...'
     
  10. adamuss

    adamuss Newbie

    Joined:
    Apr 4, 2012
    Messages:
    8
    Likes Received:
    3
    after removing links from bottom.php you need to modify smthemes.js file to disable checking if links are present in footer or not
     
  11. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
  12. adamuss

    adamuss Newbie

    Joined:
    Apr 4, 2012
    Messages:
    8
    Likes Received:
    3
    Could you PM me link to working site without links? thanks :)
     
  13. luxlyangels

    luxlyangels Registered Member

    Joined:
    Feb 18, 2013
    Messages:
    79
    Likes Received:
    17
    Location:
    Miami
    Men this is really complicated
     
  14. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    How to Do that? Confused, Even Tried One by One All Function Delete Process but No Change into Error-why?
     
  15. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    PM me your wordpress login and ftp login and I will do it for you.
     
  16. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    I have Development into Local Server
     
  17. adamuss

    adamuss Newbie

    Joined:
    Apr 4, 2012
    Messages:
    8
    Likes Received:
    3
    tell me how and I will send you modified file
     
  18. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    I have mail julie _ bholu at yah ouo {.} co [.] in

    Please Remove 'Spaces' 'u' and 'Tag' from line
     
  19. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    Eight Post to Go into 15 Posts
     
  20. julie_bholu

    julie_bholu Newbie

    Joined:
    Mar 5, 2013
    Messages:
    11
    Likes Received:
    0
    Can you tell me how can I remove the footer Links (If Possible without any Plugins), I am New into BHW so Can't PM....

    I come to know that you help cealtun gmail for same Theme... Also It is Online now.