WordPress.org

Forums

MusicStar Theme: How do I remove the links in the footer? (16 posts)

  1. JamesDowen
    Member
    Posted 4 years ago #

    The free MusicStar theme is encrypted in some way but I don't know how. I want to remove the annoying links in the footer, does anyone know how? Check it out at http://fthemes.com/musicstar-free-wordpress-theme/ if you need to. Hope you can help, thanks.

  2. JamesDowen
    Member
    Posted 4 years ago #

    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.

  3. JarretC
    Member
    Posted 4 years ago #

    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.

  4. JamesDowen
    Member
    Posted 4 years ago #

    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.

  5. JarretC
    Member
    Posted 4 years ago #

    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.

  6. JamesDowen
    Member
    Posted 4 years ago #

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

  7. ElementalUnity
    Member
    Posted 3 years ago #

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

  8. JarretC
    Member
    Posted 3 years ago #

    I could probably work this up but it'll have to wait till sometime next week, going to WordCamp San Diego this weekend! :D

  9. ElementalUnity
    Member
    Posted 3 years ago #

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

  10. JarretC
    Member
    Posted 3 years ago #

    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.

  11. ElementalUnity
    Member
    Posted 3 years ago #

    Thanks Jarrett I will let you know how it goes

  12. ElementalUnity
    Member
    Posted 3 years ago #

    Worked perfectly Jarrett thanks so much!

  13. ElementalUnity
    Member
    Posted 3 years ago #

    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

  14. JarretC
    Member
    Posted 3 years ago #

    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.

  15. ElementalUnity
    Member
    Posted 3 years ago #

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic