20+ WordPress Hacks for Developers

One of the things that WordPress really popular today is the opportunity to extend it a million ways. For example, functionality can be enhanced with plugins while themes are great for changing the appearance. As the result, the site gets tweaked to meet various needs of blogging, ecommerce, and others.

But what about unleashing a true power of WordPress with tweaks? Let’s take customizing one step further with these killer hacks.

#1. RSS Feed with Featured Images

Have you ever wondered why WordPress did not allow displaying featured images by default in RSS feeds? That’s clearly a better move if you are a blogger or you just want to provide a bit more encouragement to people to subscribe.

#2. Add a “Send to Facebook” Button

Bloggers see Facebook as a huge database of potential customers and visitors. That’s correct, with more than a billion users it can really increase the volume of traffic. So, how does one creates a “send to Facebook” button to add to a blog and boost the traffic?

It’s done by opening the single.php file in the current theme and pasting this code in the loop:

#3. Eliminate image compression

We all know that WordPress does not provide 100 percent quality images because it compresses them to 90 percent. While this may not sound like something that needs to be changed for many people, we developers know we can do better.

For example, we can force the platform to display 100 percent original images to ensure perfect quality. The following needs to be added to the current theme’s functions.php file:

#4. Reference a site with URL

By using WordPress, one can add a shortcut to a site as a reference. As the result, there is no need to type out the URL every time. Here’s how it’s done:

<?php bloginfo('url'); ?>

The function is then used like this:

<a href="<?php bloginfo('url'); >/about">About Our Company</a>

#5. Improve security by removing publicly shown WordPress version

For hackers, knowing a WordPress version is enough to try to exploit some security holes (especially in older versions: the Panama papers breach is blamed on old installations!). To hide this information from anyone, you can use the following hack:

#6. Restrict the number of people who can register

If you noticed that many new WordPress users have been visiting the user page, it means you probably allowed anyone to register. When you check the setting, you’ll find that the users are subscribing through your RSS.

If you don’t want too many registered users, go to Settings and uncheck the box that permits everyone to register using membership option. That’s it!

#7. Prevent spam by disabling HTML in comments

Spam is a real problem for many people who use WordPress. For example, bloggers often discover links to suspicious sites in the comments section. The posts with spam are not a good way to get noticed, so the problem needs to be eliminated as soon as possible.

To disable HTML and prevent spammers to include links and other methods, this code needs to be added to functions.php file:

#10. Change the admin logo

As it was said above, one of the greatest functions of WordPress is customization. This section falls into this category. The following hack allows to feature a client’s logo instead of the default admin logo. You don’t need a plugin or anything to do that, just insert the following code into functions.php:

#17. Proper URLs

#18: Reduce post revisions

WordPress comes with no default limit of post revisions stored in the database. With time, their number can increase dramatically (which won’t do any good to the site). Add the following code to wp-config.php file to set the limit:

define( 'WP_POST_REVISIONS', 3 );

The example sets the limit to 3.

#19: Disable storage of revisions

This one continues the topic of post revisions. If you want to disable them, use this code:

define( 'WP_POST_REVISIONS', -1 );

#20. Change the length of excerpts

In some cases, standard excerpts may not be the best fit for the layout. Changing them is really easy. Open functions.php and insert (“20” is the value of length):

Time to Hack!

Ready to unleash the power of WordPress with these simple but handy hacks? By trying them, you can discover new capabilities of your website and extend its functionality to make it a more functional environment.

Once you’ve seen the benefits of these hacks, you can make your content management effort more effective. Also, some of them can really enhance the security of your site, which is especially important.

All of this – without the need to install a single plugin! Given that WordPress sites rely on many plugins installed, these advancements could be very helpful to maintain a quick loading speed.

Hope this article is helpful to you to find some new WordPress hacks and enhance your site.

Like it? Share it.

Meet the Author:

Tom Jager

Tom Jager is professional blogger. He works at Proessaywriting. He has degrees in Law and English literature. Tom has written numerous articles/online journals.