17 Most Wanted WordPress Tips, Tricks, and Hacks

There are many people who wondered what WordPress tips, tricks are used in many popular WordPress websites.

In this guest post, we are going to talk about 17 most wanted WordPress tips, tricks, and hacks which will definitely help you in becoming a WordPress expert.

Here are the mentioned below 17 most wanted WordPress tips, tricks, and hacks for making you an expert in WordPress development:

Installation of Google Analytics in WordPress

Google Analytics is one of the important tool for WordPress website developers. It allows them to see where their users are coming from and how much traffic their website is generating in one full day.

In addition, the best solution to install Google Analytics is by using the plugin MonsterInsights. After that, you can insert Google Analytics code in your theme file. Therefore, after the code is entered it will be deleted or it will switch your theme.

WordPress Admin Directory for Password Protection

WordPress Admin Directory is used to perform all the administrative tasks on the website. This is already password protected because users here are required to enter the username and password before accessing the admin directory.

Moreover, by adding an extra layer of security, it makes difficult for hackers to gain access to your WordPress website.

For enabling the password protection login to the cPanel dashboard in your WordPress hosting account. After that, in security section click on “Password Protect Directories” icon.

WordPress Tips, Tricks.

Now, the user will be asked to select the directories they want to protect. Then select /wp-admin/ folder and then create the username and password.

WordPress Tips, Tricks.

Now after that, if you want to access wp-admin directory you need to enter your created username and password.

WordPress Tips, Tricks.

Showing Images in Rows and Columns

Whenever you are adding images in WordPress post by default it would appear next to each other or on the top of each other. Moreover, it does not look great because users will have to scroll down for seeing all the images.

However, it can be solved by showing the thumbnails of images in a grid layout format. Thus, it gives your website a great looking experience.

WordPress Tips, Tricks.

Allows User Subscription to Comments

In a normal scenario when a user wants to enter some comments on your website. For that, users need to enter your website visit the same article again to see who has replied to your comments posted by you.

It would be better if users start receiving notifications on emails about new comments on their post. For that, they need to simply install and activate Subscribe to Comment Reload Plugin. Once it is activated, the user needs to go to Settings then Subscribe to Comments for configuring the plugin settings.

WordPress Tips, Tricks.

Limit the Login Attempts

WordPress users can make an unlimited number of attempts to log in to a WordPress website. Therefore, it allows anyone to guess usernames and passwords until they get the right one.

On the other hand, for controlling this WordPress user need to install and activate Login LockDown plugin. Which allows you to set the limit on a number of failed attempts a user can make to login into a website.

WordPress Tips, Tricks.

Using Custom CSS to a WordPress Theme

As a WordPress developer, you may sometimes need to add custom CSS to your website. CSS allows WordPress developers to change the look and style of their WordPress website like adding new colors, new fonts, margins etc.

The easiest method to add custom CSS to any WordPress theme is by clicking on Appearances and then click on Settings in WordPress admin. Once WordPress Theme Customizer is launched, you will able to see your website preview on the right panel.

After that, click on Additional CSS option on the left panel for expanding it.

WordPress Tips, Tricks.

After that, you will see a plain textbox where you can enter your custom CSS of your choice. Once you enter the CSS rules it will reflect the changes on WordPress website.

WordPress Tips, Tricks.

In addition, don’t forget to click on “Save & Publish” button once it is finished.

Add a Facebook Thumbnail Image

Facebook automatically picks an image from the articles created whenever it is shared by you or anybody else. It generally picks the featured or main images contained in the article. Moreover, it sometimes picks any random images from articles which are not suitable at all.

In case you are using Yoast SEO plugin then select a Facebook thumbnail image in Yoast SEO meta box in the post edit screen as given below.

WordPress Tips, Tricks.

After that, you can select Facebook thumbnail image from the homepage by clicking on SEO and then go to a Social page.

WordPress Tips, Tricks.

Add Post Thumbnail or Featured Images to RSS Feed

RSS feed in WordPress shows you the list of your most recent articles. Moreover, if you are displaying the full article in the feed, then it will show all the images contained inside that article. But, featured images or post thumbnails are not included in the article.

For fixing this issue you can add following code given below to the theme functions.php or to some site specific plugin.

function rss_post_thumbnail($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID) .
'</p>' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'rss_post_thumbnail');
add_filter('the_content_feed', 'rss_post_thumbnail');
Showing Excerpts in RSS Feed

WordPress shows your full article in RSS feed by default. Moreover, it allows content scrapers to steal and fetch your full articles. In addition, it prevents your RSS subscribers to visit your website.

In order to fix it, go to Settings and then select a Reading page and then scroll down for each article in a feed using Show option. After that, select summary and then click on Save Changes button.

WordPress Tips, Tricks.

Using Shortcodes Within Text Widgets

Shortcodes allow someone to easily add small functionalities in WordPress posts and articles. But, it does not work with a text widget.

For running shortcodes in the sidebar text widget, you need to add the code mentioned below to your theme’s function.php file or site specific plugin.

add_filter('widget_text', 'do_shortcode');

Other than that, you can also use Shortcode Widget plugin which adds shortcode enabled text widgets to any WordPress website.

Add Images to WordPress Sidebar

WordPress is not at all easy way to upload and display images on the sidebar. At present, if you want to add images to sidebar then you need to add HTML code for the same.

First, you are required to upload an image to your WordPress website with the help of media uploader and copy its URL.

After that, click on Appearances option and select Widgets page and then add a widget to your sidebar. Now, inside the widget you are required to add the following HTML code mentioned below:

<img src="Paste image URL here" alt="Alternate text" />

Therefore, you can save your widget settings and preview it on your website.

Adding Content to Articles in RSS Feeds

If you want to manipulate your WordPress RSS feeds by adding content to your article. Then, add the following mentioned below to your theme’s functions.php file or to a site-specific plugin.

function johndoeblog_postrss($content) {
if(is_feed()){
$content = 'This post was written by John Doe '.$content.'Check out JohnDoeBlog';
}
return $content;
}
add_filter('the_excerpt_rss', 'johndoeblog_postrss');
add_filter('the_content', 'johndoeblog_postrss');

The following code shows the text “This post was written by John Doe” before any article and then it shows “Check out JohnDoeBlog” after article.

Delaying Posts in RSS Feeds

There are times when users accidentally publish articles before that article was not ready to go live.

Moreover, RSS feed readers and subscribers might get an email in their inbox. For that, there is an easy solution for delaying posts to appear in RSS feeds. Here is mentioned below code for the same which is to be added to your theme’s function.php file or site specific plugin.

function publish_later_on_feed($where) {

	global $wpdb;

	if ( is_feed() ) {
		// timestamp in WP-format
		$now = gmdate('Y-m-d H:i:s');

		// value for wait; + device
		$wait = '10'; // integer

		// http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
		$device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

		// add SQL-sytax to default $where
		$where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
	}
	return $where;
}

add_filter('posts_where', 'publish_later_on_feed');

Once this code is written it will delay your published posts from appearing in your RSS feed for 10 minutes.

Displaying Random Header Images in WordPress

If you want to display random header images on your WordPress website. Then, many WordPress themes are integrated with built-in support for displaying header images across the website. But, you can upload multiple header images and allow your theme to randomly display all the header images.

To perform this select the Appearance option and then select Customize page. After that, click on Header section for expanding it. Therefore, now add or upload all the header images that you want to use and then click on “Randomize Header Images” button.

WordPress Tips, Tricks.

Adding Full-Screen Search Overlay in WordPress

If you click on the search icon at the top right corner of any web page on WPBeginner users will notice that a full-screen search overlay appears. Moreover, it improves search engine and makes any web page more engaging.

Users can easily add this functionality to their WordPress websites by installing and activating WordPress Full-Screen Search Overlay plugin.

This plugin works out of the box and there is no such settings required to configure it. Once it is activated it will turn any default WordPress form field into a full-screen search overlay.

WordPress Tips, Tricks.

Adding Sticky Floating Navigation Menu

Sticky floating navigation menu stays on the top of the screen when the user scrolls down. Some WordPress themes provide this feature as an option in their settings. If your custom theme does not have this option then you should try this method.

For this, you need to first install and activate the Sticky Menu on Scroll plugin.

Once it gets activated then go to plugin settings page in Settings location and then click on Sticky Menu. Now add CSS class for navigation menu and save changes.

Adding Multiple Authors to WordPress Post

There are scenarios where you might want to add multiple authors to your article on the website.

WordPress assigns only one author for the article by default. But if you want to add multiple authors there is an easy method for doing this.

For that, you first need to install and activate Co-Authors plugin.

Therefore, now edit or create the posts where you want to add multiple authors. For this, go to post edit screen and you will notice the new authors box which is right below the post editor where a user can add multiple authors.

WordPress Tips, Tricks.

Wrapping Up

We hope that this guest blog has helped you in finding new WordPress tips, tricks, and hacks which you were not aware of it before. So, keep practicing it and implement it in your WordPress websites.

Like it? Share it.

Leave a Comment Yourself

Your email address will not be published. Required fields are marked *