Category Archives: Wordpress

How To Open All External Links From WordPress Blog Posts In A New Window

Suppose you have written hundreds of blog posts in your WordPress blog and didn’t make your WordPress post links to open in a new window or tab by selecting the “Open link in a new window/tab” in post menu. Now you want to do that for all of your existing WordPress blog posts. One way to do this is through a WordPress plugin that I wrote about previously. Or if you want to do it without any additional WordPress plugin, then you will have to login to phpMyAdmin interface from your web hosting control panel and execute the following queries in WordPress MySQL database:

UPDATE wp_posts SET post_content=REPLACE(post_content,'target="_blank"','');
UPDATE wp_posts SET post_content=REPLACE(post_content,'<a href="','<a target="_blank" href="');

First one will remove any target=”_blank” attribute in your existing post links so that you don’t have it twice after executing the second query which will add target=”_blank” attribute to all of your WordPress post links. Don’t forget to create a backup of your database before modifying :) .

How To Add Facebook Fan Page Button To WordPress Blog

Yes, I am talking about Facebook Fan Page button, not Facebook Fan Page widget :) . If you are looking for a way to add Facebook Fan Page widget to your WordPress blog, just check this blog post of mine that I wrote recently. Anyways, this Facebook Like button is basically a strip down version of Facebook Fan Page widget. It doesn’t have any of your latest site stream or doesn’t even show the faces of Facebook users who liked your fan page. It will just show a thumbs up image as the screenshot below:

How To Show Blog Posts In Place Of Message Box And Widgets In Responsive Theme Home Page

I was playing with Responsive WordPress theme yesterday for the first time. It’s a pretty popular free WordPress theme. But I had a bit of hard time just to show my recent blog posts in homepage :) . It has some widgets and one call to action message box in the homepage by default. But as I found out, changing it was quite easy and they really do have better support than most of the other free WordPress themes. After looking here and there a bit, I found their support forum. And my question was already answered. You just need to create a page and select their Blog Template as the template of the page.

Bulk Optimize All Your Existing Images in Your WordPress Media Library

Long time back I wrote a post on how you can optimize your images by reducing file sizes without compromising quality using Yahoo Smush.it tool. But do you really want to go that Yahoo page and upload and take the reduced image back to your blog every time when you upload a new photo in your WordPress blog? You would surely love something that can handle this process automatically when you upload a new photo to WordPress Media Library. More importantly what about your existing images that you have used in your previous posts? You are surely not going to take those pictures and upload in Yahoo Smush.it tool page and edit all those posts with these new pictures. Don’t worry, you don’t need to :)

Don’t Forget to Change WordPress Comment Submit URL If You Are Using Shared SSL

Sometime back I wrote a post about how you can secure WordPress blog admin area using shared SSL without any plugin. But today I found out a glitch about that method and wanted to update you on how to fix it. So basically the issue I faced was like if some user submits a comment it redirects over https connection to the comment page and shows the SSL error that my site is using an SSL certificate of a different domain. It is because WP_SITEURL now points to the shared SSL secured url path given by the host company using their own domain name like https://cp32.hostable.com/~USERNAME/BLOG_DIRECTORY, but not your own domain like http://www.waveofweb.com/. And so after clicking on the submit button it redirects to that shared SSL path and submit the comment properly and then redirects the user to comment page using https version of the domain name. At that time reader gets the warning message of bad SSL cert. There is no issue with comment submit functionality but this is bad user experience. And readers are all we have got :)

Secure WordPress Admin With Shared SSL And Without Any Plugin

Long time back I wrote a blog post on securing your whole WordPress admin area without any plugin. But that was for private SSL. It is really a pain if you try to do it using Shared SSL certificate. So if you are trying to find a way to secure your WordPress login and admin using shared SSL, you have come to the right place. Unless you know the trick, it might take a long tiring search in Google to make that work :)
I will keep it simple. In your WordPress directory open wp-config.php and then add the below two lines:
define('WP_SITEURL', 'https://cp32.hostable.com/~USERNAME/BLOG_DIRECTORY');
define( 'WP_CONTENT_URL', 'http://www.waveofweb.com/wp-content');

First line will take your connection over https using your Shared SSL certificate when you log in to your admin area. Here https://cp32.hostable.com/~USERNAME is Shared SSL link. And if your WordPress directory is not in public_html folder, then you have to append the additional path.
That first line is suffice to secure your WordPress login and admin area using your shared SSL certificate. But you need to make sure that while loading images from wp-content or graphics from the themes folder, it should be loaded on an unencrypted connection when a user views your blog posts and pages. Encrypted elements load a bit slower, so you will want to serve the post elements over normal connection to the readers. So in WP_CONTENT_URL we have specified non-secured url location.
So if your hosting provider already provides a Shared SSL certificate, you can use it to secure your WordPress blog and save some bucks that you would have spent on buying a dedicated IP address and a private SSL certificate.

Google Webmaster Tools Verification Made Easy For WordPress Blogs

WordPress team has just released a plugin to verify your WordPress blog in Google Webmaster Tools without having to copy paste any code manually. It requires only a few clicks and you can directly do it from WordPress admin dashboard. If you have multiple blogs, this WordPress plugin can reduce a lot of headaches. But remember this plugin can only be used with self-hosted WordPress blogs and WordPress.com free hosted blogs don’t support this plugin.

Check This Before You Buy Domain Name With wordpress In It

So I will try to put it in simple words, if your domain name contains “WordPress” and your site is WordPress related, then you might be violating Wordpess trademark. That is what WordPress team has to say about trademark violation in domain name. As a way around, you can use “wp” instead of “wordpress” in your domain name. So before you buy, it is better to be safe. Or after building a decent site for a year or so, you might suddenly get into a position where you need to redirect your site to a new domain and loose brand value. By the way you can use “wordpress” in your sub-domain like wordpress.mydomain.com. All they care about is top level domain name containing the word “WordPress”. Here is the official WordPress page where you can check the info.