A mistake that no blogger should ever do

Its been almost a month since I last posted on my blog. First of all I should sorry all of you out there for not being able to updated the blog specially I want to sorry to those who were expecting me to post more posts specially about wordpress. I had been quite busy with some stuff and hence couldn’t update the blog, and I am really sorry for that. I hope I will be able to keep with the pace of changing technology and post useful stuff as soon as I have any.

If you ask any blogger they will say a blog should be updated once a week except if you are posting about something that does not gets updated that frequently. But my blog was about Programming, WordPress, blogging, Twitter and Facebook which is for sure has changed a lot since I last posted. I have missed a lot of things and wasn’t able to keep myself updated with the latest stuff happening special in the social media scene.

Today when I logged on to Facebook I found out that highlights are gone, now they show up in the news feed. Facebook now have a news feed as well as Live feed, I am still not able to figure out difference between the two. But my understanding is the Live Feed thing shows that FriendFeed team is doing their work and Live feed should have real time feed coming. This is surely some great stuff coming out of Facebook and I will write more about new features and updates from Facebook very soon. I am thinking of writing posts on how to use these new features to enhance your Facebooking and use it effectively. Oh by they way, I also like that new ability of Draging and Dropping of news filters.

Twitter seems to have new features too, specially the list feature which is as per my knowledge currently only available to 5% of users. But the list feature will be available to all users from sometime next month. I hope they provide a sensible way of managing and using lists through their web interface. Also I notice Twitter is going pretty hard on spammers because they get them suspended very soon after they register. I got follow notifications from few spammers and as I manually check everyone who follows me and then follow them back if they are human and share useful stuff not just what they had in lunch. Sharing what one had in lunch is also interesting but only if that person shares other useful stuff too.

Stay tuned for more posts coming this week. I will try to do a post daily but only if I will have some useful stuff to write about.

P.S WordPress has been updated too, it is now 2.8.5. I don’t know when the update was released but I just saw the notification at the top, so gotta update too.

5 plugins to convert your blog traffic into regular and loyal readers

Don’t you like to have regular readers on your blog? Don’t you want the readers that give feedback? that add value to your blog posts by providing quality comments? Have you ever tried to figure out how to convert your blog visitor to a regular reader? How to convince them to subscribe to your blog? As in the earlier post I talked about how to increase your blog traffic. But it would be injustice to not talk about converting that traffic into regular readers. Below are few wordpress plugins that can help you in getting more conversions (subscribers or readers).

WP-Greet box

This plugin allows you to show a greeting to your visitors depending on the referrer. Now what can be more easy way to let your visitors know how they can stay updated and how easily they can subscribe to your blog. What will be more effective is to provide the actual RSS link in the greeting with an action sentence to direct them to subscribe to the RSS feed. You can also request them to follow you on twitter.

Subscribe to comments

Subscribe to comments will allow your visitors to subscribe to the blog posts comments via their email. This comes in handy when a user posts a comment on your blog and wants to be notified of the replies, or there is a valuable conversation going on the post and your visitor wants to stay updated on the conversion. In any case they will be notified of new comments on the particular blog  post and they might visit your blog again to check the comments.

WordPress Threaded Comments

Threaded comments allow visitors to reply to a particular comment, so to start or take part in conversation. When a visitor will take part in conversation they will eventually come back to your blog again and again to check on the replies or updates. The more they visit your blog the more the chances are they will comment on other posts and hence will eventually become a regular reader of your blog.

Feedburner Feedsmith

This is an old plugin that still works with WordPress 2.8.4. The plugin was developed by Steve Smith and then it was handed over to Feedburner team and can be downloaded from here, until Google drops support for it. This plugin does not provide many fancy options but simply redirects your blog’s feed url to your feedburner’s feed url. By using feedburner you can track number of your subscribers and many other things, but by publishing those numbers on your blog you might get few more visitors interested in subscribing to your blog.

Commentluv

Comment Love encourages your blog visitors to leave a comment on your blog combined with “Subscribe to Comments” those readers will eventually become your regular readers.

DoFollow

As I discussed earlier while discussing 5 ideas to encourage conversation on your blog, that making links in comments dofollow is just another trick to increase comments on your blog. So get the plugin installed and get ready to moderate large number of comments. You have been warned!!!.

Do you know of any other plugins that help encouraging your readers to keep coming back to your blog? Do you have any other ideas that can make it easy for your readers to subscribe to your blog? What strategies are you using on your blog to increase conversions?

5 wordpress plugins that will increase your traffic exponentially

Do you dream like every other blogger out there to get more traffic on your blog? Are you a new blogger that has just setup a blog and now looking to get some traffic? Are you wondering that even you are continuously writing good content but still search engines do not send the traffic like they should, why? Are you sure you are using the right plugins? Here is the list of few wordpress plugins that can get you more traffic.

All In One Seo Pack

This plugin is out of the box SEO tool for your wordpress blog. It allows you to set every aspect of your blog including meta description, meta keywords, title for home page, posts and pages. Not only that but it also allows you to control how the tag and category links are generated. It allows you to have site wide settings and as well as per post settings which makes it even more powerful. This is the must have plugin to help you get your content indexed correctly to rank better in search engines. The better you rank in search engines the more organic traffic you will get.

Google XML Sitemaps

To get traffic from search engines we also need to tell search engines how to find the content on our blog. To tell search engines we need to have an xml sitemap of our blog. All three search engine giants provide a way to manage how they index your site. You can submit your blog sitemap to the search engines so they can discover and index possibly hidden parts of your blog.

Tweetmeme button

As we all know that Twitter is getting more and more popular everyday and everyone is using to find good content, so if you have good content on your site then you should make it easy for your readers to tell their followers about it. Not only will that help your readers have good reputation among their followers for tweeting good stuff but it will get you more traffic. Tweetmeme button very nicely integrates with the blog and tracks how many times your blog post has been re-tweeted. A must have plugin if you are looking to get traffic from Twitter.

Social Bookmarking RELOADED

This plugin add a list of social bookmarking buttons below your posts and/or pages to allow your visitors to easily bookmark your posts and share them with their friends. You can enable/disable bookmarking buttons through the admin interface. The more your readers bookmark your posts the more traffic from those social bookmarking sites will come to your site.

WP-Email

WP-Email allows you to add a link to your posts and pages to allow your readers to recommend your posts to their friends. The more easy you make for your readers to recommend an article to a friend the more your readers will tell their friends and the more traffic will come to your site.

In the next post I will share how can you convert the traffic into loyal readers? What plugins can help you to get the people coming back to your blog? What plugins can help you to get your readers involve in conversation.

Currently I am curious to know that are you already using any of the plugins? How much traffic you get from twitter as compare to other social networking sites? Do not forget to share your experience in the comments.

How to exclude a category from your main wordpress index and RSS feed

Few days ago I was experimenting with Twitter tools, so I found that the Tweet Digest posts created by Twitter tools are being listed with my other posts in the main index of my blog. Twitter digests posts were not looking good to me as the Twitter digests posts from Twitter Tools were long and they were making my other posts unfindable. So I excluded that Category in the main index listing of my blog. But just yesterday I added my blog to FriendFeed and this is when I figured out that I should also be disabling the ‘Twitter Archive‘ category in the RSS feed of my blog. So I did some research and found very helpful trick from wpbeginner. Below I will show you how I used the code from wpbegginer not by just copy-pasting it but by tweaking to fit my need. Before you read further let me just remind you what I am trying to do here. I am trying to disable ‘Twitter Archive’ category (with category id 27) in the main blog listing as well as in my default RSS feed. So to simply exclude the Category from RSS feed as mentioned on wpbeginner I had to include the following code in my theme’s functions.php.

function catExclude($query) {
    if ($query->is_feed) {
         $query->set('cat','-27'); //Don't forget to change the category ID
    }
    return $query;
}
add_filter('pre_get_posts','catExclude');

But the above code proved to be not working for my case, as I wanted to exclude the category without breaking customized feed or category based feeds of my blog. As the above code is explicitly setting category with category ID ’27’ to be excluded, it doesn’t matter if you use the customize feed URL to exclude other categories. In simple words the above filter does not preserve the values of cat in the query string, it just sets the new value regardless what was provided in the url to get the customized feed. So I just can’t use this function, being a perfectionist I don’t like breaking things to build or do something new. So I did some more research on the above code and found that I can do play with $query object that is being passed to catExclude function above.

After reading about the $query object of class WP_Query I found that there is a function which allows to get the value of current variable in query string. So I just added an if condition to the above code to check if there is already a value set for ‘cat’ in query string, if there is already a value set then I don’t modify the value, else I just exclude my ‘Twitter Archive’ category. By using this check of an existing cat value I successfully excluded ‘Twitter Archive’ category form default RSS feed with out breaking the functionality and I can still have separate feeds for all my categories. Not only that but my ‘Twitter Archive’ category can also have its own dedicated feed without showing up in main default RSS feed. Below is the final code that I used to exclude the ‘Twitter Archive’ category from my RSS feed.

function catExclude($query) {
    if ($query->is_feed) {
       if (!$query->get('cat'))  {
            $query->set('cat','-27'); //Don't forget to change the category ID
       }
    }
    return $query;
}
add_filter('pre_get_posts','catExclude');

Now there is one last thing I modified in the above code to use it to exclude category in the main index of my wordpress blog. As I mentioned earlier about my previous post on the topic, that describes another way of achieving the same thing. But in case you don’t want to use that method and want to keep your edits to the single file and exclude your selected categories from both the main index and RSS feed then you use the below code.

function catExclude($query) {
    if ($query->is_feed || $query->is_home) {
       if (!$query->get('cat'))  {
            $query->set('cat','-27'); //Don't forget to change the category ID
       }
    }
    return $query;
}
add_filter('pre_get_posts','catExclude');

I hope you already have noticed the use of is_home in if condition. If you will use the code above with is_home condition then you don’t need to use the method that I mentioned in my previous post about excluding category in main index of wordpress blog. Now the last thing you might want to do with the above code that is to exclude multiple categories. Specify the multiple categories as below in your $query->set call.

$query->set('cat','-27,-30,-32');

I know the above code samples might not make much sense to non PHP programmers, so if you need to edit your wordpress blog and does not know how, you can hire me. You can also find my contact information on the contact page.

If you know a better way of doing the same thing, kindly share with us in the comments. Even if you don’t know a better way, let me know in comments what do you think about this trick and if you like it then don’t forget to share it with your friends.

Whitelisting WordPress admin (wp-admin) in mod_security to avoid 404 on post save or post preview

Yesterday while I was writing a post about excluding a category from WordPress home page and RSS feed, I found that all of a sudden the Save and Preview buttons in the WordPress Admin are not working. I was shown a “404 Not Found” screen whenever I try to Save or Preview the post. So I was bit surprised and thought its either wordpress 2.8.4 is broken or I messed something up while hacking the category exclusion in my blog. I really had to dig in and do some googling to find out that I am seeing the 404 because of mod_security. I had mod_security installed on the server and I never got to know about this issue before because I was using ScribeFire to write posts on my blogs

Now that I have found the cause of the problem I quickly rushed over to WordPress forum to find out how other people are dealing with the issue, because I was sure that I am not the only one using mod_security. After searching on WordPress forum I found a thread “Disabling mod_security“. The thread started with the person trying to disable mod_security altogether for their blog which is off-course not a good practice. But on the same thread I saw advice from djdavedawson about how to whitelist few features of your WordPress admin in mod_security. The advantage of this approach is clear that mod_security is not disabled completely and you have some layer of security. You have only allowed or whitelisted few features that were required to post new blog entries using the WordPress admin panel.

Now a days many hosting accounts come with cPanel pre-installed as was the case with my server. Assuming that is the same case with you, just in case you have another control panel you have to find your mod_security’s whitelist.conf file your self, or either hire an expert sysadmin to do it for you. 🙂 For the cPanel server the mod_security’s whitelist.conf is located at /usr/local/apache/conf/modsec2/whitelist.conf.

  1. Open whitelist.conf with a text editor
  2. Add following rules to the file.

    <LocationMatch “/wp-admin/post.php”>
    SecRuleRemoveById 300015 300016 300017
    </LocationMatch>

    <LocationMatch “/wp-admin/admin-ajax.php”>
    SecRuleRemoveById 300015 300016 300017
    </LocationMatch>

    <LocationMatch “/wp-admin/page.php”>
    SecRuleRemoveById 300015 300016 300017
    </LocationMatch>

  3. Save the file
  4. Restart Apache

NOTE: Don’t use the methods that disable mod_security completely.

This is what solved my issue of 404 on post save or post preview, in case if your problem is not solved you either have to find out the cause your self or let me know in comments what exactly is the problem and what steps have you taken. If you solved the above issue by using some other method kindly share in the comments.

PS: This post has been written using WordPress admin panel to confirm everything is working fine.

How to exclude posts of a single category from main listing of your wordpress blog.

As I recently launched this blog I am still trying to experiment with few things, so I enabled Daily and Weekly digests of my tweests in Twitter Tools. Now I still want to have those digests but I don’t like seeing the posts in the main post listing or in feeds. So I decided to hack into wordpress and exclude the “Tweets Archive” category from the main post listing. I had to do bit of research into WordPress Codex and some testing to make it working so I decided to share it here on the blog as well.

  1. Goto your Blog Admin and then goto Categories under Posts.
  2. Click on the Category you want to exclude and then note the Category ID number. You can see the number in the picture below that is shown at the end of the URL in the address below. In my case it was category id 27 which I had to exclude.
  3. How to find the Category ID on your wordpress blog

  4. Goto your WordPress Blog Admin and then goto Editor under Appearance.
  5. Wordpress Blog Admin Appearance Theme Editor

  6. Open the file “index.php” from right column and find the line “<?php if (have_posts()) : ?>”
  7. Wordpress Blog Theme Editor index.php file

  8. Just before that line add following code:
  9. <?php if (is_home()) { query_posts($query_string . "cat=-27"); } ?>

  10. Save the file and you are done.

Congratulations if you have followed till here. This might not be your first WordPress hack or you might have already done the same thing probably using some other method or may be plugin, or you might have learned something new in this short hackorial. Let me know you thoughts or give me some suggestions, I would love to hear from you.

How to add Google Friend Connect Member Gadget to your site in 10 steps

Do you have a wordpress blog? Have you ever tried to add Google Friend Connect? If you have already add the Google Friend Connect to your wordpress blog kindly read on and let me know if I did it the right way? If you haven’t yet added then you must read on and add the Google Friend Connect Members Widget to your wordpress blog. Now, you must be thinking what is Google Friend Connect and why do you need Google Friend Connect for your blog?

The social activity on web is increasing every day, now all websites have been converted to social networks where people interace and share what they are doing? Whether it is bookmarking like on delicious.com or whether it is sharing items on your Google Reader or uploading videos to youtube, everything has got those social functions which you can use to interact and connect with your friends or other people on those sites. Why not you connect your blog readers? Or why not allow your blog readers to tell their friends what they are reading on?  What blogs they are subscribe too? Why not show to the world what people have subscribed to your blog? This is where Google Friend Connect comes in. The readers on your blog can connect with each other, they can review your blog, they can share cool posts on your blog and they can flow your blog this is unlike traditional RSS where you don’t know who is the Subscriber. With Google Friend Connect you see the pictures and profile information of your subscribers. I think this is enough introduction of Google Friend Connect, lets just see how can you  add Google Friend Connect to the wordpress blog.

1. Goto Google Friend Connect and hit the “Get Started” button.

Google Friend Connect Welcome Page

2. Click the “Setup New Site” to add your site in Google Friend Connect.

Google Friend Connect - Setup New Site

3. Click Continue on the Overview Page to actually start adding your site details.

Google Friend Connect - Continue

4. Enter your Site Name and Home URL (the site url) and click Continue.

GoogleFriendConnect - Site Name and URL

5. Download “rpc_relay.html” & “canvas.html” and upload both files to the root of your web site.

GoogleFriendConnect - Connectors for your site

6. Click “Test to Finalize Setup” to setup the site in Google Friend Connect.

GoogleFriendConnect - Test and Finalize

7. Click the “Get Code for Members Gadget”.

GoogleFriendConnect - Get Member Gadget Code

8. Configure your Gadget as per your site’s look & feel or just hit the Generate Code to get the gadget with default colors.

GoogleFriendConnect - Generate Code

9. Goto your WordPress blog admin interface and then to the widgets under Appearance. Add a new text widget and paste the generated code from step 8 as the content of the new Text widget.

10. Click Save and you are done.

Below is the screen shot of Google Friend Connect Sidebar Member Gadget from FreelanceStartup as I took the Screen shot as soon as I added the gadget so you can see I am the only member. If this post help you or you find it useful, please don’t hesitate in joining the FreelanceStartup Site as I share the things that I find useful in my Freelancing Journey.

 

Technorati Tags: , ,