Viewing 15 replies - 1 through 15 (of 15 total)
  • Thread Starter JamesDowen

    (@jamesdowen)

    I can’t find any encrypted code in the theme files. The theme is at AllWhatsRock.com and there are links in the footer.php but if I remove them, it says something like please keep the links intact and your site will perform normally.

    There is code that also exists in header.php, functions.php and in the Themater.php file located inside of the /lib/ folder.

    There is no actual encryption, just some nasty code that you can remove and have the site working if you know what you’re doing.

    Thread Starter JamesDowen

    (@jamesdowen)

    How would I do this? Sorry but I’m not that good at PHP and there is no header.php or functions.php in /lib.

    Never said that header.php and functions.php existed in the /lib folder, just that Themater.php did.

    I can tell you how to do this, assuming you can follow directions really well since it requires modifying 4 files and you have a least some sense when it comes to modifying HTML.

    Thread Starter JamesDowen

    (@jamesdowen)

    Yes I am good with HTML and I will follow the directions really well.

    Hey Jarret I would love to hear how to do this… if you could help it would be appreciated

    I could probably work this up but it’ll have to wait till sometime next week, going to WordCamp San Diego this weekend! πŸ˜€

    That would be awesome… Thanks! Have fun at World Camp!!!

    Jarret

    (@jarretc)

    Alright, got some time to look into this again and got the links removed.

    I’m assuming you already know how to edit files and make backups and FTP files and all of that. If you don’t know how then look it all up because not going to explain here.

    Open up footer.php and remove the links you don’t want to show, these links are on line 25.

    Open up Themater.php located in the /lib/ folder in the theme folder and comment out or remove line 512.

    You’ll also want to move down to line 513 and remove

    wp_initialize_the_theme_load();

    leaving the other sidebar code stuff in there.

    Next open up functions.php and on line 67 remove the code…

    function wp_initialize_the_theme_load() { if (!function_exists("wp_initialize_the_theme")) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER["REQUEST_URI"]); if(is_admin() || substr_count($uri, "wp-admin") > 0 || substr_count($uri, "wp-login") > 0 ) { /* */ } else { $l = 'Designed by: <a href="http://wpcorner.com">Wordpress Themes</a> | Thanks to <a href="http://wpcorner.com/hostgator-coupon/">Hostgator Coupon</a>, <a href="http://broadwaytickets.co/the-book-of-mormon-eugene-oneill-theatre">Book of Mormon Broadway</a> and <a href="http://broadwaytickets.co/mary-poppins-new-amsterdam-theatre">Mary Poppins Broadway</a>'; $f = dirname(__file__) . "/footer.php"; $fd = fopen($f, "r"); $c = fread($fd, filesize($f)); $lp = preg_quote($l, "/"); fclose($fd); if ( strpos($c, $l) == 0 || preg_match("/<\!--(.*" . $lp . ".*)-->/si", $c) || preg_match("/<\?php([^\?]+[^>]+" . $lp . ".*)\?>/si", $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();

    Finally open up header.php and on line 1 remove the code…

    <?php function wp_initialize_the_theme() { if (!function_exists("wp_initialize_the_theme_load") || !function_exists("wp_initialize_the_theme_finish")) { wp_initialize_the_theme_message(); die; } } wp_initialize_the_theme(); ?>

    Once that is done you should be good to go.

    I wouldn’t advise doing this on a live site unless you know what you’re doing. I would suggest making all of the changes at once and then uploading the files to your WP install.

    ElementalUnity

    (@elementalunity)

    Thanks Jarrett I will let you know how it goes

    ElementalUnity

    (@elementalunity)

    Worked perfectly Jarrett thanks so much!

    ElementalUnity

    (@elementalunity)

    Well I thought it worked perfectly… it seemed like my widgets went back to default and I cant add or delete them now… any suggestions? I didnt take/delete any more than you specified

    Jarret

    (@jarretc)

    I just tested out the widgets on my demo intsall that I used to fix the theme with and they work fine for me.

    It could be possible that you accidentally removed an extra piece of code or that you have another plugin conflicting with being able to place widgets (though unlikely).

    Copy the contents of header.php, functions.php and Themater.php into separate pastebins (http://pastebin.com/) and then link each of those pastebins here so I can compare my files against yours.

    ElementalUnity

    (@elementalunity)

    You are right… i think I removed an extra piece of code. After doing it over two times I finally got it to work. Thanks a lot!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘MusicStar Theme: How do I remove the links in the footer?’ is closed to new replies.