{"id":1063,"date":"2013-06-03T11:02:40","date_gmt":"2013-06-03T09:02:40","guid":{"rendered":"http:\/\/www.extradrm.com\/?p=1063"},"modified":"2013-09-21T18:32:45","modified_gmt":"2013-09-21T16:32:45","slug":"how-to-remove-some-wordpress-theme-footer-without-error","status":"publish","type":"post","link":"https:\/\/www.extradrm.com\/?p=1063","title":{"rendered":"How to remove some wordpress theme footer without error"},"content":{"rendered":"<p>It is difficult to remove some WordPress theme footers because the coders coded complex code outside the footer template itself. When removing footer the theme will stop working or works with errors &#8230;<br \/>\nIt is not nice to remove the footer links but with the new penalities google algorithms on backlinks, some designers prefer to get rid of those footer copyrights link.<\/p>\n<p>In the file functions.php replace code :<\/p>\n<pre>function wp_initialize_the_theme_load() \r\n{ \r\nif (!function_exists(\"wp_initialize_the_theme\")) \r\n{ wp_initialize_the_theme_message(); die; } } \r\nfunction wp_initialize_the_theme_finish() \r\n{ \r\n$uri = strtolower($_SERVER[\"REQUEST_URI\"]); \r\nif(is_admin() || substr_count($uri, \"wp-admin\") &gt; 0 || substr_count($uri, \"wp-login\") &gt; 0 ) { \/* *\/ } \r\nelse \r\n{ $l = 'Designed by: SA Dating | Thanks to Iron Worker Jobs, Dog Trainers and Florida Personals'; \r\n$f = dirname(__file__) . \"\/footer.php\"; \r\n$fd = fopen($f, \"r\"); \r\n$c = fread($fd, filesize($f)); \r\n$lp = preg_quote($l, \"\/\"); \r\nfclose($fd); \r\nif ( strpos($c, $l) == 0 || preg_match(\"\/&lt;\\!--(.*\" . $lp . \".*)--&gt;\/si\", $c) || preg_match(\"\/&lt;\\?php([^\\?]+[^&gt;]+\" . $lp . \".*)\\?&gt;\/si\", $c) ) { wp_initialize_the_theme_message(); die; } } } \r\nwp_initialize_the_theme_finish();\r\n<\/pre>\n<p>with code :<\/p>\n<pre>\r\nfunction wp_initialize_the_theme_load() \r\n{ \r\nif (!function_exists(\"wp_initialize_the_theme\")) \r\n{ wp_initialize_the_theme_message(); die; } } \r\n\r\nfunction wp_initialize_the_theme_finish() { \r\n$uri = strtolower($_SERVER[\"REQUEST_URI\"]); \r\nif(is_admin() || substr_count($uri, \"wp-admin\") &gt; 0 || substr_count($uri, \"wp-login\") &gt; 0 ) { \/* *\/ } else { \/* *\/ } } \r\nwp_initialize_the_theme_finish();\r\n<\/pre>\n<p>In the file lib\/themater.php replace this (line 512 onwards) replace code :<\/p>\n<pre>\r\nif (!empty($_REQUEST[\"theme_license\"])) \r\n{ wp_initialize_the_theme_message(); exit(); } \r\nfunction wp_initialize_the_theme_message() \r\n{ if (empty($_REQUEST[\"theme_license\"])) { $theme_license_false = get_bloginfo(\"url\") . \"\/index.php?theme_license=true\"; echo \"&lt;meta http-equiv=\\\"refresh\\\" content=\\\"0;url=$theme_license_false\\\"&gt;\"; exit(); } else { echo (\"&lt;p style=\\\"padding:20px; margin: 20px; text-align:center; border: 2px dotted #0000ff; font-family:arial; font-weight:bold; background: #fff; color: #0000ff;\\\"&gt;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.&lt;\/p&gt;\"); } }\r\nif(!function_exists('get_sidebars')) { function get_sidebars($the_sidebar) { wp_initialize_the_theme_load(); get_sidebar($the_sidebar); } }\r\n<\/pre>\n<p>with the following code :<\/p>\n<pre>\r\nif(!function_exists('get_sidebars')) { \r\nfunction get_sidebars($the_sidebar) { get_sidebar($the_sidebar); } }\r\n<\/pre>\n<p>Finally, In the file header.php on line 1, remove everything after the doctype thing.<\/p>\n<p>Then you can remove or adjust the text in <strong>footer.php<\/strong> to what you like.<\/p>\n<p>Cheers,<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is difficult to remove some WordPress theme footers because the coders coded complex code outside the footer template itself. When removing footer the theme will stop working or works with errors &#8230; It&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":2842,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[24,31],"tags":[196,197],"youtube_video":null,"_links":{"self":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1063"}],"collection":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1063"}],"version-history":[{"count":0,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/posts\/1063\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=\/wp\/v2\/media\/2842"}],"wp:attachment":[{"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1063"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1063"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.extradrm.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1063"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}