Tag: wordpress tips and tricks

Remove comment-reply.js from WordPress header

Remove comment-reply.js and .recentcomments from WordPress Header

Have you ever seen the following code inside the HEAD section of your WordPress blog source code like image above? (It’s appear in single post page only). Now let’s view the css code below, it’s appear in the HEAD section too, when the Recent Comments Widget used

.recentcomments a{display:inline !important;padding: 0 !important;margin: 0 !important;}

Ever wonder how it got there, and how to get rid of it?

Remove or Disable Recent Comments Widget CSS code

Why they did not just drop this altogether is a mystery. This leaves a bad taste in my mouth because:

  • the style is automatically forced into any page that embeds the widget
  • it uses !important to override any existing styles
  • it cannot be configured from the widget
  • this is a core WordPress widget and not some widget added by a random plugin. WordPress should not contain such bad practices.
  • It is something that should be handled via a style sheet.

Remove comment-reply.js from WordPress header
Fortunately, we can remove or disable it by adding a filter via the WordPress add_filter() method. In fact, if you look at the TwentyTen theme that comes with the later versions of WordPress 3.0 and on, you will find that theme addresses this issue with the following snippet of code in their functions.php file:

Drop this code into your functions.php file and the styling will be removed from your HEAD section.

Remove or Disable comment-reply.js code

Let’s see what is place above in header.php

<?php if ( is_singular() ) wp_enqueue_script( 'comment-reply' ); ?>
        <?php wp_head(); ?>

Now, we can remove or disable this script more easily by delete this direct from header.php or use wp_deregister_script() function

function clean_header(){
	wp_deregister_script( 'comment-reply' );


Almost parts of WordPress template codes is modifiable or removable by add or remove filter methods in functions.php file. Let’s think about it before hacking to WordPress core sources or create your own WordPress child themes.

Move from Wordpress.com to your own Wordpress.org self-host

Things to do when move your website from WordPress.com to self hosted

You’ve started your first blog on WordPress.com because the service was free, you weren’t required to have any technical skills and there were plenty of widgets, themes and plug-ins to help you quickly customize the blog. However, a time comes when you might want to move to your own domain name which is a continuance of your WordPress.com blog. Moving your WordPress.com blog to a self-hosted WordPress.org is actually more simple than you might believe! Sure there’s a few steps but all good things require a bit of work, right?
Move from WordPress.com to your own WordPress.org self-host

Continue reading

Jetpack Wordpress.com Stats Configuration

How to hide The WordPress Stats Smiley Face

Automattic just released a collection of plugins as one “super-plugin” called Jetpack. As they explained it, the goal was to bring eight of the most requested features available on WordPress.com to the millions of self-hosted WordPress sites in one easy-to-install curated package. If you use JetPack Stats on your site (formerly released as a stand alone plugin called WordPress.com stats), you may be familiar with the smiley face image face :)that it adds to the bottom of every page on your site.
The smiley was added as a visual way to make sure the stats are tracking and is not something that can be removed directly from the plugin code. Like many other bloggers I do like the WordPress stats service but I’m not a huge fan of it so I looked into how you can remove it. Simplest way to remove it is to go into your themes style sheet (style.css) and put the following code snippet:

Thankfully, the recent release of JetPack addressed this issue. If you go to the configuration page for JetPack stats


you will now see an option to hide the smiley image.

Jetpack WordPress.com Stats Configuration
Jetpack WordPress.com Stats Configuration

So now you know how to remove the WordPress Stats smiley face. The question is, do you really want to?!

Essential Wordpress Plugins to Backing Up your Database

10+ Essential WordPress Plugins to Backing Up your Database

Just imagine, then, the all-consuming sorrow of losing weeks, months or even years of blog posts or other site content. Your hosting company may provide a responsible backup service (or you may have a well-considered system in place if your site is self-hosted) but some extra insurance can be crucial if the unexpected happens (as it did for one of our client sites today).
Keeping an up-to-date blog backup copy, is one of those things that every one would like to do but are either too lazy to actually do it or have no clear idea of how it can be done. Backup is vital but it needs to be painless otherwise people just do it less often (which defeats the purpose, your backup should not really be older than a couple of days ago).

Essential WordPress Plugins to Backing Up your Database
Essential WordPress Plugins to Backing Up your Database

The ways which I’ve ever tried, an ideal backup procedure should be simple, heavily automated and give quick recovery option for almost any problem. Your backup must be up-to-date and it’s can store on your computer, another hosting server, another online storage service ….
Choosing a WordPress backup plugin that is right for you which has listed below
Continue reading

Mastering Worpress [gallery] shortcode

From WordPress 2.5, the Gallery feature allows the option to add an image gallery to a Post or Page on your WordPress blog.
Upload all your photos and simply type the shortcode [gallery in a post or page to display a thumbnail gallery of images attached to that post or page. Clicking on a thumbnail image will open either the original image or a larger image in a separate Attachment page.
Continue reading

WordPress Problem: Post content disappear

This is the oddest thing I’ve ever seen on WordPress. Here’s my problem:
I have a whole ton of text. But the last few lines I have this:

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

IF I add this line next (without the quotes)…

“I try to keep anybody from having to go back and fix anything so it makes them have to play it now, you know?”

The entire body of the post disappears. Only the title shows up. If I remove that line, the text comes back. If I add “asdf”, the body stays. If I add a random line, the body disappears. I thought maybe it was a phantom html tag hidden in there or something, so I copied and pasted into notepad to clear any potential underlying formatting and it’s still doing it. I’ve never seen anything like it. I’ve been poking at this thing for hours. I even tried moving the entire contents to a new post. No dice. I erased and rewrote the entire offending section and then some… nothing. We’ve got several hundred posts and this has never happened. There’s a good 20 blockquotes in this post and everything works fine.
Continue reading