Comment on Remove WordPress Meta Generator Tag by SEO Dave.
Like anything in life it’s easy when you know how :-)
Although you can edit the WordPress theme functions.php file under your Dashboard: can pretty much assume all WordPress themes today (2014) have a Functions.php file.
If you make a code mistake that breaks the theme (white screen of death) you won’t have access to the Dashboard WordPress Theme Editor (accessed via “Appearance” >> “Editor”) since you’ll be locked out of the Dashboard by the code error and will either have to use FTP or a control panel to either fix the file or delete the themes folder (that forces WordPress to use the default WP Twenty Fourteen theme).
For this reason it’s advisable to use an FTP program like Filezilla (it’s free) so you can edit the file in a text editor (Notepad will do), upload the edited functions.php file via FTP and if you made a mistake upload the original functions.php file (obviously keep a backup of the unchanged file) fixing your code error.
You’ll find your functiosn.php file at:
/wp-content/themes/THEME-NAME/functions.php
However you decide to add code (if it’s the WordPress theme editor be careful) to the functions.php file it usually works at or very near the end.
Some functions.php files end with:
?>
If this is what your themes functions.php files last line looks like it makes sense to enclose whatever code you are adding within a opening and closing PHP tag like this and add it on the final line after the last ?> :
<?php remove_action('wp_head', 'adjacent_posts_rel_link_wp_head'); ?>
If your themes functions.php doesn’t end in
?>
Means the PHP code doesn’t end as such.
In this case add the code as is like this (so no <?php and ?> bits):
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head');
For both examples it’s important not to add extra blank lines or spaces (white space) after the code you’ve added, can cause some issues with your RSS Feeds if there’s white space in PHP files (messes up feeds, not sure why). Basically don’t add your PHP code and a bunch of carriage returns or spaces after.
Sounds a lot more complicated than it is, edit file, copy and paste code at the bottom, access site via FTP program and upload the editing functions.php file over the current file, see if it works. Takes about 3 minutes when you know how, takes less time in the online theme editor, but make a code error and, DOH!
David
More Comments by SEO Dave
WordPress Meta Generator Tag
WordPress Navigation Links
Looks like the code is used for the WordPress single page next and previous links and the next and previous links for archives (categories navigation etc…).
Top is for single, bottom archives, either delete the reference to this file on single.php
<?php …
Continue Reading WordPress Version Number
WordPress Meta Generator Tag
Editing WordPress Template Files
In your WordPress themes single.php you’ll probably have a line of code like this:
<?php include (TEMPLATEPATH . "/bot-nav.php"); ?>
Based on bot-nav.php is probably just the code for the next and prev links removing the above line from single.php would remove …
Continue Reading WordPress Version Number
WordPress Meta Generator Tag
Adding HTML/PHP Code to WordPress Comments
To add HTML/PHP code to a WordPress comment you have to put it between code tags, otherwise WordPress strips it to prevent comments looking a mess:
<code>
Add PHP/HTML Code Here
</code>
Doesn’t always work, this isn’t built into WordPress core, so is a …
Continue Reading WordPress Version Number
WordPress Meta Generator Tag
WordPress Next and Previous Post Links
Hmm, you might be asking the wrong question.
When you say remove the “Next and Previous Posts Links” do you mean when viewing source of your websites code you see something like this near the top of the code (in the …
Continue Reading WordPress Version Number
WordPress Meta Generator Tag
Remove Post Relational Links from WordPress
Glad you figured out how to use FTP, can be a sticking point for those new to website development.
I don’t log into other users websites other than to try to fix issues with my own WordPress themes and then only …
Continue Reading WordPress Version Number
WordPress Meta Generator Tag
How To Fix WordPress White Screen
WordPress white screen normally means you’ve broken some PHP code.
Revert the code you changed to what it was before the change.
If you worked online with the WordPress editor and you can’t login to to your Dashboard.
Either reupload the unedited theme …
Continue Reading WordPress Version Number