Customising WordPress FAQ

FAQ

How to turn off WordPress Post Revisions?

Insert this into “wp-config.php” file

// Turn off WordPress Post Revisions
define('WP_POST_REVISIONS', false);

How to Delete Existing WordPress Post Revisions?

Goto phpMyAdmin –> Select your WordPress database from the sidebar –>Click the SQL tab –> Insert this and click go –>

DELETE FROM wp_posts WHERE post_type = "revision";

How to Limit the Number of Saved Revisions?

Add this to “wp-config.php” changing the number to suit your needs

define ('WP_POST_REVISIONS', 2);

How to Remove all RSS feeds?

Search for the code below in “functions.php” and either remove it or comment it out //

add_theme_support( 'automatic-feed-links' );

How can i deactivate individual JetPack widgets?

On the JetPack dashboard if you click “Learn More” on any of the widgets your see the “Learn More” button changes to “Deactivate”.

How can i protect my admin folder?

Create a new file in your wp-admin folder called “.htaccess” and insert the below replacing 92.6.96.175 with your ip address.
View your ip here http://ianjgough.com/wp-content/demos/ip-address/index.php

Order Deny,Allow
Allow from 92.6.96.175
Deny from all

 

How can i replace the empty Alt tag for Gravatar with the comment authors name?

Add the following to your theme’s functions.php

function replace_content($text)
{
$alt = get_comment_author($id_or_email);
$text = str_replace('alt=\'\'', 'alt=\''.$alt.'\'',$text);
return $text;
}
add_filter('get_avatar','replace_content');

Updated with function on 27/12/2012 as modifying core wordpress files is not recommended and any changes made could be lost when updating wordpress.

About This Site

Dreams are built from lines of code well it's true!
If you can dream it you can usually code it.

I have learned so much from other people on the Internet and this site is for me to give back some of what i have learned and hope people can now learn from me.
Have fun and surf safely,
Ian.J.Gough

protected by copyscape duplicate content check

Categories


Powered by Banner Bar 125