How to Add Underline and Justify Text Buttons in WordPress

Are you looking for the missing underline and justify button in WordPress post editor? These buttons were removed from the post editor in WordPress 4.7. But there’s a way to bring them back. In this article, we will show you how to add underline and justify text buttons in WordPress.

Underline and Justify Text in WordPress

Method 1: Using Re-add Text Underline and Justify Plugin

First thing you need to do is install and activate the Re-add Text Underline and Justify plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » Writing page to configure the plugin settings.

Re-Add underline and justify text plugin settings

The plugin comes with two options to choose from.

You can add the underline and justify text buttons, so they will appear in the second row of the post editor buttons.

Alternatively, you can choose to re-add buttons and rearrange. This will put underline and justify text buttons in the same position as they were before WordPress 4.7.

Don’t forget to click on the save changes button to store your settings.

You can now visit Posts » Add New page, and you will find underline and justify text buttons added back to the post editor.

Underline and Justify text buttons added back in WordPress post editor

Method 2: TinyMCE Advanced Plugin

This method allows you to do a lot more than just adding the underline and justify text buttons. You can add custom styles, add missing buttons, and even create your own buttons.

First, you need to install and activate the TinyMCE Advanced plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Settings » TinyMCE Advanced page to configure plugin settings.

Drag and drop underline and justify text buttons to the post editor

You will notice a preview of the WordPress post editor. Below the preview, it will show you all the unused buttons.

Now you need to drag and drop underline and justify text buttons from ‘Unused Buttons’ box to the post editor.

Don’t forget to click on the save changes button to store your settings.

You can now create a new post or edit an existing one. You will notice that the default WordPress post editor is replaced by the TinyMCE Advanced editor.

We hope this article helped you learn how to add underline and justify text buttons in WordPress. You may also want to see our list of tips for mastering the WordPress visual editor.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

How to Regenerate PDF Thumbnails in WordPress

Recently, one of readers users asked if it was possible to regenerate PDF thumbnails for old uploads in WordPress? In WordPress 4.7, you now have thumbnail previews for all new PDF files. However, this change does not affect older uploads. In this article, we will show you how to regenerate PDF thumbnails in WordPress for older uploads.

Regenerate PDF thumbnails for old uploads in WordPress

Why and Who Needs to Regenerate PDF Thumbnails?

WordPress introduced PDF thumbnail previews in WordPress 4.7. This feature creates image previews of the first page of a PDF file uploaded using media uploader.

However, this feature only works on new PDF files that you uploaded after updating your site to WordPress 4.7.

All older PDF files will still appear as a generic icon in the media library, and you will still have to use a PDF plugin to show a thumbnail preview on attachment pages.

If you regularly upload PDF files, then you will need to regenerate thumbnail for your older PDF uploads.

It is similar to regenerating thumbnails for images after adding new image sizes to your WordPress theme. However, those plugins do not support PDF files at the moment.

Having said that, let’s take a look at how to regenerate PDF thumbnails for older uploads in WordPress.

Regenerate PDF Thumbnails in WordPress

Before you move on, please make sure that you are using WordPress 4.7 or higher. Also make sure that you have imagemagick extension installed on your server.

You can test imagemagick by simply uploading a PDF file to your WordPress site. If it shows a thumbnail preview for your PDF file, then you are good to go.

Please note, that the plugin we are going to use in this article, will regenerate thumbnails for all your older image files as well. As a precaution, backup your WordPress site or at least backup your /wp-content/uploads/ folder.

First thing you need to do is install and activate the Force Regenerate Thumbnails plugin.

The plugin is hosted on GitHub. If you haven’t installed plugins from GitHub before, then take a look at our guide on how to install WordPress plugins from GitHub.

Upon activation, you need to visit Tools » Force Regenerate Thumbnails page.

Regenerate all thumbnails

Here you can regenerate thumbnails for all images and PDF files you uploaded using WordPress media uploader. Click on ‘Regenerate All Thumbnails’ button to continue.

The plugin will now start processing all images on your website. It will take some time, depending on how many images and PDF files you have.

Once finished, you can visit Media » Library page and you will be able to see thumbnail previews for your old PDF uploads.

Media library

The plugin also allows you to regenerate thumbnails for individual files. If you do not have many PDF files, then it would be better to regenerate thumbnails individually.

You will need to visit Media » Library page and switch to the list view by clicking on the list view button.

After that take your mouse over to a PDF file, and you will be able to see ‘Force regenerate thumbnails’ link.

Generating thumbnail for a single PDF file in WordPress

Clicking on the link will regenerate thumbnails for that particular file.

Once you have regenerated thumbnails for all your old PDF uploads, you can safely deactivate and delete the plugin. Uninstalling or deleting the plugin will not delete the thumbnails regenerated by the plugin.

We hope this article helped you regenerate PDF thumbnails for old uploads in WordPress. You may also want to see our list of 24 must have WordPress plugins for business websites.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

How to View and Control WordPress Cron Jobs

Recently, one of our readers asked if it was possible to view and control the WordPress cron job system in the dashboard. Cron is a technology to run scheduled tasks on web server. WordPress comes with its own built-in cron that allows it to perform scheduled tasks such as checking for updates, publishing schedule posts, etc. In this article, we will show you how to view and control WordPress cron jobs.

What is WordPress Cron? How it Works?

Cron is a technical term used for commands to run on scheduled time or at regular intervals. Most web servers use it to maintain the server and run scheduled tasks.

WordPress comes with its own cron system which allows it to perform scheduled tasks. For example, checking for updates, deleting old comments from trash, etc.

Plugins can also use it to perform tasks specified by you.

For example, your WordPress backup plugin can use WordPress cron to automatically create backups at given schedule.

Irresponsible use of WordPress cron by plugins can slow down your website. Specially, if you are on shared hosting.

If a plugin frequently performs resource intensive tasks, then you need to identify the issue and fix it.

Let’s take a look at how to view and control the WordPress cron system without writing any code.

View and Control WordPress Cron System

First thing you need to do is install and activate the WP Control plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Tools » Cron Events page to control cron settings.

WordPress Cron events

You will see a list of all cron events scheduled to run on your site using the WordPress cron system.

In the first column, you will see the name of the hook that runs the cron.

Hook names usually give you a hint at what this particular event does.

Most default WordPress hooks begin with a wp_ prefix, like wp_update_plugins, wp_update_themes, etc.

Your WordPress plugins may or may not use their own prefixes for their hooks. For example, yoast seo uses wpseo_ prefix.

You will also get to see when a cron will run next, and the time interval between next run.

The last column on the list allows you to edit, delete, or run a cron event.

Important: Be very careful about what you do with cron events and never delete a default WordPress cron event.

Now let’s suppose you see a cron event created by a WordPress plugin that is quite resource intensive.

First, you should check the plugin’s settings to see if there is an option to control it from there. If there isn’t, then you can click on the ‘Edit’ link next to the cron event to change it.

Editing a cron in WordPress

Clicking on the Edit button will open the ‘Modify cron event’ tab down below.

Here you can change how often you want the event to run.

Modifying cron settings

Once you are done, click on the save changes button to store your settings.

Adding Your Own Cron Events in WordPress

WP Control plugin makes it easy to add your own cron jobs to WordPress. Simply visit Tools » Cron Events page and scroll down to ‘Add Cron Event’ tab.

Add custom cron event in WordPress

First you need to provide a hook name for your cron event. Hook names cannot have spaces or special characters.

If the function you want to execute requires arguments, then you can provide those arguments.

Next, you need to tell WordPress when to run the cron next time. You can enter ‘now’ which will trigger cron immediately, ‘tomorrow’, ‘+2 days’, or ’25-02-2020 12:34:00′.

Lastly, you need to select a schedule. You can select hourly, twice daily, daily, or once a week. You can also make it non-repeating event.

Once you are done, click on the Add Cron Event button to save your changes.

You will notice that your cron event will now appear in the events list.

However, currently it does nothing because you haven’t told WordPress what to do when this event is triggered.

You will need to add your hook and a function that runs when the cron hook is triggered.

if ( ! wp_next_scheduled( 'wpb_custom_cron' ) ) { wp_schedule_event( time(), 'hourly', 'my_task_hook' );
} add_action( 'wpb_custom_cron', 'wpb_custom_cron_func' ); function wpb_custom_cron_func() { wp_mail( 'you@example.com', 'Automatic email', 'Automatic scheduled email from WordPress to test cron');
}

Don’t forget to use your own email address.

This function simply sends a test email to you when the cron runs. You can now scroll up the page and click on the ‘Run Now’ link next to your cron event to test it out.

Note: Using cron requires intermediate level programming and WordPress development skills.

That’s all we hope this article helped you learn how to view and control WordPress cron jobs. You may also want to see our ultimate guide to speed up WordPress and boost performance.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

How to Prevent Duplicate Post Titles in WordPress

Your blog post title and URL play an important role in SEO. Having a duplicate post title can negatively the affect SEO performance of your site. WordPress deals with duplicate post titles by adding a number at the end of URL slug. However these titles are still duplicate, and you should try to avoid them. In this article, we will show you how to prevent duplicate post titles in WordPress.

Prevent duplicate post titles in WordPress

How WordPress Handles Duplicate Post Titles

WordPress automatically uses the post title as URL slug.

In case of a duplicate post title, WordPress tries to distinguish the title by adding a number at the end of the URL slug.

Number in the post URL

Since both post titles are still using the same keywords, this could confuse search engines when deciding which post should be ranked for the keywords used in the title.

Avoiding Duplicate Post Titles in WordPress

If you are running a single author website, then you can easily avoid this by simply changing the title and removing the number from WordPress URLs. However, it’s a lot harder to keep track of when you are running a multi-author WordPress site.

But don’t worry, the solution we’re going to cover is going to help you prevent duplicate post titles and advise your authors to change them.

First thing you need to do is install and activate the Unique Title Checker plugin. For more details, see our step by step guide on how to install a WordPress plugin.

The plugin works out of the box, and there are no settings for you to configure.

Simply go to Posts » Add New and enter a unique post title. The plugin will check the post title and notify you that it is unique, and you are good to go.

Unique post title

You can now try again by creating another new post. This time use a title that you have already used for another post.

The plugin will notify you that this title is already been used.

Duplicate post title warning

It will not stop you from editing the post, saving it, or even publishing it.

However, the warning will let you and other authors on your website know that they should use an alternate title.

We hope this article helped you prevent duplicate post titles in WordPress. You may also want to see our step by step WordPress SEO guide for beginners.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

How to Add Audio Stories to Images in WordPress

Do you want to add audio stories to your images in WordPress? You can use it to add narration to your photographs, or simply create web based audio visual story books. In this article, we will show you how to easily add audio stories to images in WordPress.

How to add audio stories to images in WordPress

First thing you need to do is install and activate the Audio Story Images plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you need to visit Media » Add New and upload your image and audio file you want to add to the image.

Upload your audio and image files in WordPress

After uploading both files, you need to visit the Media » Library page. Next, click on the list view icon to display your media files in a list.

You will now notice a new column labeled ‘Audio Story’. You need to click on the ‘attach’ link next to the image you just uploaded.

Link image to the audio file

This will bring up a popup where you need to select the audio file you want to attach to the image.

Select your audio file

Go ahead and click on the select button to continue.

The plugin will now link your image and audio file to each other.

Audio and image files linked together

Now that your image is linked to the audio file, you can add it to any WordPress post or page.

Simply edit a post or page where you want to add the image and click on the ‘Add Media’ button.

Add image in a WordPress post or page

This will bring up the media uploader popup.

You need to select the image file you just uploaded and insert it into your post.

Select your image from media library

Once you are satisfied, you can either save or publish your changes.

After that click on the preview button to see your audio story image in action.

Audio story image in WordPress

The plugin will add a tiny volume icon on the top left corner of your image. Clicking on the icon will play the audio file linked to the image.

We hope this article helped you learn how to add audio stories to images in WordPress. You may also want to see our guide on how to find royalty free images for your WordPress blog posts

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.