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 text from wordpress theme?

Discussion in 'Black Hat SEO' started by ashuthinks, Feb 22, 2012.

  1. ashuthinks

    ashuthinks Newbie

    Joined:
    Feb 22, 2012
    Messages:
    1
    Likes Received:
    0
    Hi,
    I have created a blog in wordpress used a theme from ftheme

    I'm getting error :
    These links are all family friendly and will not hurt your site in any way

    when I try to delete footer text please help me how can I do this.

    footer.php

    PHP:
    <?php global $theme?>

        <div id="footer-wrap" class="span-24">
            
            <div id="footer">
            
                <div id="copyrights">
                    <?php
                        
    if($theme->display('footer_custom_text')) {
                            
    $theme->option('footer_custom_text');
                        } else { 
                            
    ?> Â© <?php echo date('Y'); ?>  <a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a>. <?php _e('All Rights Reserved.''themater');
                        }
                    
    ?> 
                </div>
                
            </div>
            
        </div>

    </div>

    <?php /* 
                        All links in the footer should remain intact. 
                        These links are all family friendly and will not hurt your site in any way. 
                        Warning! Your site may stop working if these links are edited or deleted 
                        
                        You can buy this theme without footer links online at fthemes/buy/?theme=accrue 
                    */ 
    ?>

    <div id="credits">Powered by <a href="wordpress/"><strong>WordPress</strong></a> | Designed by: <a href="suv.reviewitonline/">best suv</a> |  <a href="suv.reviewitonline/audi-suv/">audi suv</a>, <a href="suv.reviewitonline/infiniti-suv/">infiniti suv</a> and <a href="suv.reviewitonline/toyota-suv/">toyota suv</a></div><!-- #credits -->

    </div><!-- #wrapper -->

    <?php wp_footer(); ?>
    <?php $theme
    ->hook('html_after'); ?>
    </body>
    </html>
     
  2. regcleaner

    regcleaner Junior Member

    Joined:
    Jul 10, 2009
    Messages:
    126
    Likes Received:
    2
    you could analyze/show some function on functions.php
     
  3. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    This is just a simple wordpress plugin I coded which will remove the footer links as well as the BLOGROLL from wordpress themes. You can modify it as you like.

    To use it, save it as anyfilename.php and upload to the wordpress plugins directory and activate it in the admin panel.

    PHP:
    <?php
    /*
    Plugin Name: BlogRoll Remover
    Plugin URI: http://wpsynit.zar.vg
    Description: Remove BlogRoll from WordPress Pages. Also Try WPSYNIT - Auto Backlinks for Wordpress
    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;
    }

            return 
    $html;
    }

    ?> 
     
    • Thanks Thanks x 5
    Last edited: Feb 22, 2012
  4. bhspiderz

    bhspiderz Registered Member

    Joined:
    Aug 30, 2011
    Messages:
    69
    Likes Received:
    22
    I ran across this in the past which the template would break if you took the links out. What I would suggest is getting a good text editor like Notepad++ and opening all the php files in the templates and doing some basic searches related to those links.

    I believe you are going to find a function that is checking those links and you can just null the function. Some template makers will have multiple checks so you may have to dig a bit further. Overall though if you have been exposed to php at all you should be able to find and eliminate the issue.
     
  5. dynamoblue

    dynamoblue Newbie

    Joined:
    Mar 6, 2012
    Messages:
    4
    Likes Received:
    1
    Wickedguy your are the man! Your plugin worked a snap and was easy as pie to use. I activated it and, "poof!" went my footers. It even replaced the copyright with the name of my site! So cool! Thanks so much!

    LOL I joined just so I could thank and rep you! :)

     
    • Thanks Thanks x 1
  6. wickedguy

    wickedguy Supreme Member

    Joined:
    Jul 22, 2009
    Messages:
    1,402
    Likes Received:
    1,379
    Location:
    BHW--> South Africa
    Home Page:
    That's nice of you! haha :D
     
  7. slowlyslowly

    slowlyslowly Registered Member

    Joined:
    Jan 3, 2012
    Messages:
    84
    Likes Received:
    15
    Occupation:
    Nun
    Location:
    Convent
    You might even get away with replacing it with another themes footer.php file - you never know, its worked for me in the past on some occasions!

    Might try Wickedguy's plugin in future as well