{"id":3608,"date":"2013-12-05T11:46:25","date_gmt":"2013-12-05T11:46:25","guid":{"rendered":"http:\/\/www.webputzer.com\/?p=3608"},"modified":"2014-03-11T23:02:59","modified_gmt":"2014-03-11T23:02:59","slug":"fthemes-remove-the-crazy-ass-footer-links","status":"publish","type":"post","link":"http:\/\/www.webputzer.com\/?p=3608","title":{"rendered":"Fthemes &#8211; remove the footer links"},"content":{"rendered":"<p>&nbsp;<\/p>\n<h2>FThemes Overview<\/h2>\n<p><strong>FThemes<\/strong> 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\u2019ve paid for the things \u2013 usually $29.00 per theme. A couple of notes about this collection:<\/p>\n<p>This is a big collection \u2013 about 350 themes, currently. \u00a0 Some of the themes are decent, and, a lot of them are extremely lame. \u00a0I&#8217;ve been tinkering with a couple of them but I haven&#8217;t see any (yet) that I&#8217;d actually want to buy. \u00a0 A lot of these themes are very, very similar to one another \u2013 which is why they can probably make so darned many&#8230;.<\/p>\n<h3>Not really free, though advertised as free<\/h3>\n<p>Though they\u2019re advertised as \u201cfree for personal use\u201c, all free versions (as noted above) include strange links in their footers. I\u2019m not real impressed with what I view as the misleading manner in which they\u2019re presented \u2013 basically, it\u2019s a lie by omission. They\u2019re free for personal use if you don\u2019t mind having multiple links to various trucking companies, hosting companies, etc. in the footer. Fthemes describes the footer links as \u201cfamily friendly\u201c, and that appears to be the case (they don\u2019t link to porn sites, nor, anything else that folks might find objectionable). You can Google this outfit \u2013 I\u2019m not going to link to their site (for obvious reasons). If you\u2019re really nuts about one of these themes and using it, you should send them their money \u2013 I guess they\u2019ve earned it.<\/p>\n<h3>Really worth buying? Probably not.<\/h3>\n<p>Is it possible that one of the designs from this outfit could be just what you&#8217;re looking for, and, worth at least twenty-nine bucks? Maybe &#8211; but I think it&#8217;s pretty doubtful. \u00a0 But if you want to fiddle with one, you&#8217;re stuck with the oddball footer links unless you do some editing.<\/p>\n<h2>Removing the Footer Links<\/h2>\n<p>Okay kids \u2013 let\u2019s get one thing straight right now: when I use a WordPress theme with any seriousness, I buy the thing (when it\u2019s a retail theme). Name a major collection and, chances are, I\u2019ve purchased one of their themes. But, even for the purposes of testing, I didn\u2019t want to leave a site on my server with a bunch of kooky links in the footer. As I\u2019ve mentioned, that\u2019s what you get when you download FThemes \u201cfree\u201d, personal versions.<\/p>\n<p>Okay, let\u2019s say your\u2019re like me: you\u2019ve 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\u2019m 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\u2019ll find that your website either is completely broken, or, that is displays a page saying that you can\u2019t remove the footer links without sending these guys their money \u2013 it\u2019s that simple. The fix is less obvious, and, more complicated than it may first appear.<\/p>\n<h2>Two hacks for two directory structures \u2013 both work<\/h2>\n<p>Recently, just goofing off, I download all of these themes. The links in the footer, for whatever reason, really bugged me \u2013 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\u2019ll find that some themes contain a \u201clib\u201d 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.<\/p>\n<h3>1. When there is no lib directory present<\/h3>\n<p>If the theme you\u2019re, uhm, \u201cediting\u201d <strong><em>does not have a directory called \u201clib\u201d<\/em><\/strong> follow these steps. Open the functions.php file and find the following code (keep any single quotes surrounding these strings intact):<\/p>\n<p>function wp_initialize_the_theme_load() { if (!function_exists(&#8220;wp_initialize_the_theme&#8221;)) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER[&#8220;REQUEST_URI&#8221;]); if(is_admin() || substr_count($uri, &#8220;wp-admin&#8221;) &gt; 0 || substr_count($uri, &#8220;wp-login&#8221;) &gt; 0 ) { \/* *\/ } else { $l = &#8216;Designed by: SA Dating | Thanks to Iron Worker Jobs, Dog Trainers and Florida Personals&#8217;; $f = dirname(__file__) . &#8220;\/footer.php&#8221;; $fd = fopen($f, &#8220;r&#8221;); $c = fread($fd, filesize($f)); $lp = preg_quote($l, &#8220;\/&#8221;); fclose($fd); if ( strpos($c, $l) == 0 || preg_match(&#8220;\/&lt;\\!&#8211;(.*&#8221; . $lp . &#8220;.*)&#8211;&gt;\/si&#8221;, $c) || preg_match(&#8220;\/&lt;\\?php([^\\?]+[^&gt;]+&#8221; . $lp . &#8220;.*)\\?&gt;\/si&#8221;, $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();<\/p>\n<p><strong>Replace the above with:<\/strong><\/p>\n<p>function wp_initialize_the_theme_finish() {$uri = strtolower($_SERVER[&#8220;REQUEST_URI&#8221;]);<br \/>\nif(is_admin() || substr_count($uri, &#8220;wp-admin&#8221;) &gt; 0 || substr_count($uri, &#8220;wp-login&#8221;) &gt; 0 ) { \/* *\/ } else { } } wp_initialize_the_theme_finish();<\/p>\n<p>Now, <strong>edit your footer.php file<\/strong>, removing the links in question. That\u2019s it.<\/p>\n<h3>2. When there IS a lib directory present<\/h3>\n<p>Okay \u2013 if the theme you\u2019re tinkering with has a lib directory in it\u2019s file structure, you\u2019ll have to perform significantly more editing. Again, open the functions.php file and find the following code:<\/p>\n<p>&#8216;function wp_initialize_the_theme_load() { if (!function_exists(&#8220;wp_initialize_the_theme&#8221;)) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER[&#8220;REQUEST_URI&#8221;]); if(is_admin() || substr_count($uri, &#8220;wp-admin&#8221;) &gt; 0 || substr_count($uri, &#8220;wp-login&#8221;) &gt; 0 ) { \/* *\/ } else { $l = &#8216;Designed by: SA Dating | Thanks to Iron Worker Jobs, Dog Trainers and Florida Personals&#8217;; $f = dirname(__file__) . &#8220;\/footer.php&#8221;; $fd = fopen($f, &#8220;r&#8221;); $c = fread($fd, filesize($f)); $lp = preg_quote($l, &#8220;\/&#8221;); fclose($fd); if ( strpos($c, $l) == 0 || preg_match(&#8220;\/&lt;\\!&#8211;(.*&#8221; . $lp . &#8220;.*)&#8211;&gt;\/si&#8221;, $c) || preg_match(&#8220;\/&lt;\\?php([^\\?]+[^&gt;]+&#8221; . $lp . &#8220;.*)\\?&gt;\/si&#8221;, $c) ) { wp_initialize_the_theme_message(); die; } } } wp_initialize_the_theme_finish();&#8217;<\/p>\n<p><strong>Replace with:<\/strong><\/p>\n<p>&#8216;function wp_initialize_the_theme_load() { if (!function_exists(&#8220;wp_initialize_the_theme&#8221;)) { wp_initialize_the_theme_message(); die; } } function wp_initialize_the_theme_finish() { $uri = strtolower($_SERVER[&#8220;REQUEST_URI&#8221;]); if(is_admin() || substr_count($uri, &#8220;wp-admin&#8221;) &gt; 0 || substr_count($uri, &#8220;wp-login&#8221;) &gt; 0 ) { \/* *\/ } else { \/* *\/ } } wp_initialize_the_theme_finish();&#8217;<\/p>\n<p>In the file <strong>lib\/themater.php<\/strong>, at about line 512 (in a lot of themes), find the following code:<\/p>\n<p>if (!empty($_REQUEST[&#8220;theme_license&#8221;])) { wp_initialize_the_theme_message(); exit(); } function wp_initialize_the_theme_message() { if (empty($_REQUEST[&#8220;theme_license&#8221;])) { $theme_license_false = get_bloginfo(&#8220;url&#8221;) . &#8220;\/index.php?theme_license=true&#8221;; echo &#8220;&#8221;; exit(); } else { echo (&#8220;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.<br \/>\n&#8220;); } } if(!function_exists(&#8216;get_sidebars&#8217;)) { function get_sidebars($the_sidebar) { wp_initialize_the_theme_load(); get_sidebar($the_sidebar); } }<\/p>\n<p><strong>Replace with:<\/strong><\/p>\n<p>if(!function_exists(&#8216;get_sidebars&#8217;)) { function get_sidebars($the_sidebar) { get_sidebar($the_sidebar); } }<\/p>\n<p><strong>Finally&#8230;.<\/strong><\/p>\n<p>Open the <strong>header.php <\/strong>file. Just under the document declaration you\u2019ll find a string of PHP code that isn\u2019t normally found in a WordPress theme (you can\u2019t miss it). Simply remove this line. That\u2019s it.<\/p>\n<h3>If you use the thing, pay &#8217;em!<\/h3>\n<p>I\u2019m not going to write a treatise, here, on ethics. If one of these themes really drives you wild (and it\u2019s something you really want to use, for a long time) you should just buy the damned thing. That\u2019s my view, anyway\u2026..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; 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\u2019ve paid for the things \u2013 usually $29.00 per theme. A couple of notes about this collection: This is a big collection [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":3624,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"h5ap_radio_sources":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3608","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/3608","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3608"}],"version-history":[{"count":0,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/posts\/3608\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=\/wp\/v2\/media\/3624"}],"wp:attachment":[{"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3608"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3608"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.webputzer.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3608"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}