Tag Archives: WordPress

Get Extended Settings For BuddyPress. Editing BP-Avatar, Profile Links, Tabs, Thumbnail Size Etc

Get Extra configuration Settings For BuddyPress Admins, Editing BP Avatar size, Profile Links, Activity, Friends, Message, Group Including Other Tabs And Much More.
Continue reading Get Extended Settings For BuddyPress. Editing BP-Avatar, Profile Links, Tabs, Thumbnail Size Etc

How To Keep Log Of WordPress PHP And Database Errors ?

Keeping Error Logs is helpful to know about invalid database queries and file requests of your website. You can easily enable error logging in WordPress either by plugin or by hack. 

Continue reading How To Keep Log Of WordPress PHP And Database Errors ?

WordPress Hack For Adding Signature After Posts Content

Open your theme’s function.php and add the following code. Remember changing text after equal sign with your own.

function custom_content_after_post($content){
if (is_single()) {
$content .= ‘<p>Load Your Content Here</p><img src=”‘. get_template_directory() .’/images/signature.png” alt=”Your Name” />’;
}
return $content;
}
add_filter( “the_content”, “custom_content_after_post” );

You may also use WordPress Signature Plugin for doing so. It allows WP users to put signatures below every post. After installing and activating it you can easily access it by navigating to WP-Admin Dashboard >> Tools >> WPSignature.

Become Google’s Verified Author For Your WordPress Blog

After getting Google’s verified authorship you will be seeing your blog post search results with the screen shot of your Google Plus Profile Image. As show below:

Google Search Results, Before And After Activating Google’s Verified Authorship

For doing this in your blog results, follow these steps

Open your theme’s header.php file and add the following given code block in head section –

<link rel=”author” href=”https://plus.google.com/107466614529996508363/posts” />

Remember:

  • Change the profile URL with your Google Plus Profile URL in the above given code block.
  • Head section is between <head> and </head> tag so add the given code in between these tags.

Now open your theme’s function.php file and the following action at last:

add_action(‘wp_head’, ‘add_google_rel_author’);
function add_google_rel_author() {
echo ‘<link rel=”author” href=”https://plus.google.com/107466614529996508363/posts” />’;
}

  • Visit your Google+ Profile.
  • Click Edit and make your +1s pubic.
  • Scroll down to  contributors section.
  • Under the heading “Contributor to” add your blog’s address.

That’s all. Next Google’s re-crawl to your blog pages will start showing your face in Google search results. So wait for it. You can  reduce this time by writing a new blog post.

Disable Comments On WordPress Media Attachments

Using WP Plugin

Download and activate Disable Comments plugin. Using this plugin admins can easily disable comments site wide or according to post type. After installation it can be accessed from settings menu of admin area dashboard.

Using WP Hack

Add this code in your theme’s function.php file:

function filter_media_comment_status( $open, $post_id ) {
$post = get_post( $post_id );
if( $post->post_type == ‘attachment’ ) {
return false;
}
return $open;
}
add_filter( ‘comments_open’, ‘filter_media_comment_status’, 10 , 2 );

How To Protect wp-config.php And .htaccess Files In WordPress ?

You can block access to your site’s wp-config file from browser by adding following code in your .htaccess file:

# Block access to wp-config
<files wp-config.php>
order allow,deny
deny from all
</files>

For blocking access to your .htaccess file add this code inside your .htaccess file:

# Block access to htaccess
<files .htaccess>
order allow,deny
deny from all
</files>

Note:.htaccess file is present in your site’s root at the same place where you find wp-config file.

Protecting Your WordPress Admin From Hacks

You may use this trick for adding an additional layer of security on your WordPress site so that your site don’t get compromised and hacked:

  1. Open your cPanel.
  2. From Security section click Password Protect Directories.
  3. Now on the Pop Up. Select root then from your WordPress installation select wp-admin.
  4. Check Password protect this directory.
  5. Create a user for that directory; there is an option below the check box. That’s it..

Now anytime you visit wp-admin directory you should notice an authentication box asking you for the username and password for authentication.

Sometimes it may show some errors depending on how your server is configured. Don’t worry, just ask me here about the problem(if you face one).

Monitor, Manage And Backup All Of Your WordPress Sites At Once From A Single Place

Using WP Remote you easily monitor, update and backup all of your WordPress sites at the same time from a single place. It communicates with your WordPress site using API like Akismet so there is no need of providing username and password and it is completely free to use.

Features:

Know WP Remote Latest Enhancements

  1. It can track all of your sites.
  2. No limitation to number of sites you add.
  3. It can update WP-Core, all plugins and themes.
  4. Check WP Remote Security policy here.

WP-Hack For Adding Google+ Page Badge ‘Add to Circles’ In Your WordPress Blog

Add this code in your theme’s header.php file’s head section:

<link href=”https://plus.google.com/PageID” rel=”publisher” /><script type=”text/javascript”>
(function()
{var po = document.createElement(“script”);
po.type = “text/javascript”; po.async = true;po.src = “https://apis.google.com/js/plusone.js”;
var s = document.getElementsByTagName(“script”)[0];
s.parentNode.insertBefore(po, s);
})();</script>

Replace PageID (in bold text of above code block) with your Google+ Page ID.

Now visit your blog’s wp-admin (Dashboard) >> Appearance >>Widgets and drag text widget to your sidebar.

Paste following code inside your text widget (replacing PageID) :

<g:plus href=”https://plus.google.com/PageID” size=”badge”></g:plus>

For smaller badge use:

<g:plus href=”https://plus.google.com/PageID” size=”smallbadge”></g:plus>

Note: You can get your Google Plus Page ID by visiting your page’s profile and copying the number before /posts or /about in URL.