Fthemes – remove the footer links

 

FThemes Overview

FThemes is an outfit which has developed a large collection of WordPress themes which can be downloaded freely, but, all of which which contain strange links in their footers until you’ve paid for the things – usually $29.00 per theme. A couple of notes about this collection:

This is a big collection – about 350 themes, currently.   Some of the themes are decent, and, a lot of them are extremely lame.  I’ve been tinkering with a couple of them but I haven’t see any (yet) that I’d actually want to buy.   A lot of these themes are very, very similar to one another – which is why they can probably make so darned many….

Not really free, though advertised as free

Though they’re advertised as “free for personal use“, all free versions (as noted above) include strange links in their footers. I’m not real impressed with what I view as the misleading manner in which they’re presented – basically, it’s a lie by omission. They’re free for personal use if you don’t mind having multiple links to various trucking companies, hosting companies, etc. in the footer. Fthemes describes the footer links as “family friendly“, and that appears to be the case (they don’t link to porn sites, nor, anything else that folks might find objectionable). You can Google this outfit – I’m not going to link to their site (for obvious reasons). If you’re really nuts about one of these themes and using it, you should send them their money – I guess they’ve earned it.

Really worth buying? Probably not.

Is it possible that one of the designs from this outfit could be just what you’re looking for, and, worth at least twenty-nine bucks? Maybe – but I think it’s pretty doubtful.   But if you want to fiddle with one, you’re stuck with the oddball footer links unless you do some editing.

Removing the Footer Links

Okay kids – let’s get one thing straight right now: when I use a WordPress theme with any seriousness, I buy the thing (when it’s a retail theme). Name a major collection and, chances are, I’ve purchased one of their themes. But, even for the purposes of testing, I didn’t want to leave a site on my server with a bunch of kooky links in the footer. As I’ve mentioned, that’s what you get when you download FThemes “free”, personal versions.

Okay, let’s say your’re like me: you’ve downloaded one of these things to try it out but you wanna get rid of the oddball links in the footer. Unless you have excellent PHP skills, getting rid of these links will be difficult. In my case, I’m a C-minus PHP person and I got nowhere in this little endeavor. If you simply remove a bit of code which (very obviously) appears to add these links you’ll find that your website either is completely broken, or, that is displays a page saying that you can’t remove the footer links without sending these guys their money – it’s that simple. The fix is less obvious, and, more complicated than it may first appear.

Two hacks for two directory structures – both work

Recently, just goofing off, I download all of these themes. The links in the footer, for whatever reason, really bugged me – even though I was just tinkering. I eventually found a web site with information for removing the links. Anyway, when these are unarchived on your desktop (or on your server) you’ll find that some themes contain a “lib” directory and others do not. Depending upon whether or not a theme contains a lib directory, you can use one of the following hacks to remove the footer links.

1. When there is no lib directory present

If the theme you’re, uhm, “editing” does not have a directory called “lib” follow these steps. Open the functions.php file and find the following code (keep any single quotes surrounding these strings intact):

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: SA Dating | Thanks to Iron Worker Jobs, Dog Trainers and Florida Personals’; $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();

Replace the above with:

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 { } } wp_initialize_the_theme_finish();

Now, edit your footer.php file, removing the links in question. That’s it.

2. When there IS a lib directory present

Okay – if the theme you’re tinkering with has a lib directory in it’s file structure, you’ll have to perform significantly more editing. Again, open the functions.php file and find the following 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: SA Dating | Thanks to Iron Worker Jobs, Dog Trainers and Florida Personals’; $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();’

Replace with:

‘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 { /* */ } } wp_initialize_the_theme_finish();’

In the file lib/themater.php, at about line 512 (in a lot of themes), find the following code:

if (!empty($_REQUEST[“theme_license”])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST[“theme_license”])) { $theme_license_false = get_bloginfo(“url”) . “/index.php?theme_license=true”; echo “”; exit(); } else { echo (“All the links in the footer should remain intact. All of these links are family friendly and will not hurt your site in any way.
“); } } if(!function_exists(‘get_sidebars’)) { function get_sidebars($the_sidebar) { wp_initialize_the_theme_load(); get_sidebar($the_sidebar); } }

Replace with:

if(!function_exists(‘get_sidebars’)) { function get_sidebars($the_sidebar) { get_sidebar($the_sidebar); } }

Finally….

Open the header.php file. Just under the document declaration you’ll find a string of PHP code that isn’t normally found in a WordPress theme (you can’t miss it). Simply remove this line. That’s it.

If you use the thing, pay ’em!

I’m not going to write a treatise, here, on ethics. If one of these themes really drives you wild (and it’s something you really want to use, for a long time) you should just buy the damned thing. That’s my view, anyway…..

Leave a Reply