8 Innovative WordPress Hacks for Developers

wordpress hacks developers - 8 Innovative WordPress Hacks for Developers

WordPress is the world’s most popular content management system (CMS) that powers 27 percent of the web. Some of the reasons why people prefer it so much despite the availability of other functional systems are numerous:

  • It’s free and open source
  • You can create just about any website with it
  • It’s SEO-friendly
  • It’s easy to use
  • It has a massive community of active users and developers
  • It’s secure
  • It supports multimedia.

Last but not least, WordPress is awesome because you can customize and extend it in almost any way you want to meet your needs. You don’t even have to install any additional plugins for many of these tweaks. In fact, customizing your WordPress can be as easy as inserting a line of code.

Here are some hacks for you to help make WordPress easier to use.

#1. Show Related Posts without Plugins

Displaying related posts is a good idea to help visitors find useful information and stay on the site longer. Many bloggers don’t know that they can easily integrate this function by default and download yet another plugin that does that (and we know the dangers of having too many plugins).

Here’s a step-by-step instruction on how to do that.

  • Open the single.php file
  • Insert this code in the loop:

And don’t forget to save the file!

#2. Delete “Howdy” and Replace it with “Logged in as”

If you don’t like the default greeting “Howdy” and want to replace it with something else, follow these steps:

  • Open functions.php file
  • Paste the following:

Save the file.

#3. Add a Shortcode to Widget

A shortcode is an awesome tool that allows being creative with little effort. As a developer, you probably use them often to create objects while avoiding long lines of ugly code, but does your site have them enabled by default?

You can do that by adding the following line to the functions.php file:

#4. Decrease the Number of Post Revisions

“WordPress is without a doubt the best for blogging, but making numerous revisions takes a heavy toll on our limited database space,” says Jimmy Duncan, an editor at Proessaywriting.

“Turning them off was a huge space saver.”

Indeed, WordPress allows endless revisions in one post, but this is certainly not helpful for your website because all of them require storage. If reducing the number of revisions makes sense to you, feel free to add this line of code to wp-config.php file:

Keep in mind that you can include any number in the code. Disabling the revisions altogether requires putting “-1” instead of “3” as in the example.

#5. Force Perfect Images

WordPress compresses images to 90 percent of the original, which means that there’s a slight decrease in quality. While this is not a problem for many people, professional photographers require maximum quality of their photos.

There’s a way to force 100% quality. Just do the following:

  • Open functions.php file
  • Paste the following code:

Save file.

#6. Reduce the Chance of Hacking by Hiding Publicly Visible System Version

As a developer, you probably know that hackers exploit security shortcomings in older WordPress versions used by websites. (in fact, having an outdated version is one of the main reasons for hacking). Removing the publicly visible version thus makes perfect sense to reduce this risk.

Use this code to do that.

#7. Exclude Pages from Site Search

If for some reason you want to keep certain pages out of search results, you can insert this code to functions.php file:

#8. Display the Number of Results Found

This could be a way of improving your website’s user experience because knowing how many pages with search results were found may be useful to visitors.

And this is easily achieved by inserting this code to search.php file (change “5” to any number you want):

Wrapping Up

Remember: all those handy hacks can be done without any plugins. Just need to know the right code! So feel free to add them to your arsenal and improve your work with WordPress.

If you are looking to speed up your WordPress website see: 7 Tips for Speeding up Your WordPress Blog in 2018

Powered by Start Fast Stay Fast Website Speed Optimization Theme by SiteNow

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.

Leave a Reply

Get more stuff like this
in your inbox

Subscribe to our mailing list and get interesting stuff and updates to your email inbox.

Thank you for subscribing.

Something went wrong.