Posts

Showing posts from July, 2017

How to Locate the PHP File Containing a Tag in WordPress

Image
WordPress may be simple to use and maintain, but under the hood it’s actually quite complex. Years ago, making modifications to the layout of a page involved directly going into the corresponding PHP page and changing the source code. Then as people started wizening up, they realized that  creating a child theme  was a better idea. After a while, they started leaving themes alone and made changes via the functions.php file, or a dedicated child theme. The internal structure of WordPress has changed as well. These days, major frameworks like Genesis and Thesis don’t use a simplistic architecture of a single file for a single page. If you visit the classed “single.php” template file, you probably won’t find the HTML tags you expect to see in a “single” page. The default WordPress themes have also adopted a more sophisticated approach, choosing to go for “template parts” and other such modifications. Now of course, all this hasn’t been done for fun. These changes reflect a desire to

How to Show a Random Post on the Homepage in WordPress

Image
By default, WordPress displays all the posts on the homepage in reverse chronological order. This works out great for sites with continuously changing content like a news or technology blog. However, this leads to what I feel is a huge “wastage” of content that can still be relevant. Not all content is time sensitive. An outdated news story certainly doesn’t need to be resurfaced. But an interesting political analysis might always be relevant. We’ve talked about  republishing older blog posts  before, and that’s one way to get leverage out of your existing content. But what if you could randomly serve up blog posts on your homepage everytime a visitor viewed it? There are lots of plugins and pieces of code that show you random blog posts on the sidebar in the form of a widget. But so far, I haven’t seen anything that displays a random blog post on the homepage. I’m not looking to republish older blog posts, or replace the existing reverse chronological set up. I just want to show

How to Configure a Linux Server to Send E-mail

Image
If you’re looking to set up a Linux box all by yourself, you’ll want to configure an e-mail server sooner or later. This seems like it should be a simple job, but it’s not. The e-mail architecture can be bewilderingly complex, with dozens upon dozens of options and things that can go wrong. No surprise then, that we have dedicated mail server administrators whose sole job it is to know the ins and outs of e-mail infrastructure. However, there are times when we don’t care about the bells and whistles and just want to do one thing – send and receive e-mail. Sometimes we don’t care about security, features like passwords, virtual users, mailboxes, SMTP, POP etc. We want the ability to go to a terminal, type in a single command and send an e-mail. One of the ways to eventually build up to a complete mail solution is to start small. Start with the basics, test it, and then move ahead. As we progress, we can build up features like spam filtering etc. But in this tutorial, we’re going t

Web Hosting Coupon Codes

Image
How to Choose a Web Host Choosing the right web host for you can be confusing. And especially so if you’re a beginner with no knowledge of coding and programming languages. 1. Start off with Shared Hosting When you first start out hosting your websites there is very little need for VPS (virtual private server) or a dedicated server. Tests done of shared hosts versus dedicated hosts indicate that there is very little difference between the types of servers on small websites. As your website grows, however, you may want to upgrade to these options. Some hosts like Fatcow only offer shared hosting, whereas Dreamhost is geared more towards enterprise level websites, so the transition to a VPS would be seamless. The Best: – Dreamhost offers great service at all levels and 100% uptime guarantee. 2. Customer Support If you’re calling customer support for your web site then you’re already pretty frustrated. Having to wait on the line for hours and then getting unfriendly servi