Weekly WordPress News: The Biggest WordPress Headaches

This week, Pagely published the results of their survey about WordPress headaches. Performance issues took the lead as the biggest pain point. Weglot also published a new transparency report that details some pretty massive growth. And we have some good developer guides on Gutenberg migration, MySQL data reconstruction, and styling the default WordPress media player. ... Read moreWeekly WordPress News: The Biggest WordPress Headaches

The post Weekly WordPress News: The Biggest WordPress Headaches appeared first on Learn WordPress with WPLift.

9 Best Quiz Plugins for WordPress (2018)

Are you looking for the best quiz plugins for your WordPress site? Many popular websites like BuzzFeed use quizzes to create viral content and boost user engagement on their websites. In this article, we have hand-picked the best quiz plugins for WordPress that will help you engage your users and increase time spent on your site.

Best quiz plugins for WordPress

1. LearnDash

LearnDash

LearnDash is the best WordPress LMS plugin on the market. It comes with a powerful Quiz feature which allows you to create any type of quiz that you need. It has multiple question types including: single choice, multiple choice, free text, sorting, matching, essay, fill-in-the-blank, and survey.

Some of the other features include: timed quizzes, randomized questions, question bank, multi-page quizzes, limit attempts, and more. Post quiz options include redirects, messages, quiz result displays in multiple styles, leaderboard, certificates, and levels.

Whether you are selling online courses or creating viral content, LearnDash is the most flexible WordPress quiz plugin for all types of quizzes.

2. TryInteract

TryInteract

TryInteract is a powerful web-based app to generate viral quizzes and use them to generate leads, build social media following, generate traffic, and improve conversions. It allows you to create highly interactive quizzes with a nifty drag and drop quiz builder.

You can choose different styles, colors, designs, and more than 100 ready-to-use quiz templates. It supports quiz branching which allows you to show questions based on user’s answers to previous questions. You can use their scoring system to easily show results at the end.

It can be easily added to your WordPress site using a simple shortcode and integrates beautifully with your email marketing and CRM software.

3. WP Quiz

WP Quiz

WP Quiz is a flexible and easy to use quiz plugin for WordPress. It comes with 3 quiz types: trivia, personality, and flip cards. You can add images to your questions and answers, allow users to restart quiz, show results at the end, and more.

WP Quiz comes with two styling options: multi-page or single page quiz. You have the ability to auto-scroll and add social sharing buttons. The pro version of the plugin allows you to force users to perform an action to view results, randomize questions and answers, countdown timer, and display ads.

4. Quiz And Survey Master

Quiz and Survey Master

Quiz and Survey Master is a flexible quiz plugin and WordPress survey plugin. This powerful two-in-one plugin may look a bit rough around the edges, but it makes up for it with excellent features and extensive documentation.

It supports multiple types of questions including multiple choice, true and false, fill the blanks and more. It also allows you to create multiple result pages, so you can customize them based on user score. It comes with email support, certificates, leaderboards, hints, comment boxes, and even more features available with paid add-ons.

5. mTouch Quiz

mTouch Quiz

mTouch Quiz is a mobile-friendly WordPress quiz plugin written with mobility and learning in mind. It supports hints, multiple correct answers, highlight correct answer during or after the quiz, restrict answer attempts, and more.

You can create customized start and finish screens as well as randomize questions. It also comes with point values for each question for show a score card at the end.

6. Quiz Cat

Quiz Cat

Quiz Cat is a free WordPress quiz plugin with an easy to use interface and great options to create viral quizzes for your website. It allows you to add images to each question and answer. You can also create a start and finish screen for your quiz.

Upon activation, the plugin will ask you to connect to their website API. However, it would work just fine without connecting to the API. It is easy to use with simple options that work really well.

7. HD Quiz

HD Quiz

HD Quiz is another awesome free quiz plugin for WordPress websites. It has a responsive design and allows you to create unlimited quizzes with as many questions and answers as you need. You can also use GIF images with your questions and answers to make them more interactive and fun.

Other notable features include quiz timer, question tooltips for hints, social sharing, use images as answers, scoring, and more.

8. ARI Stream Quiz

ARI Stream Quiz

ARI Stream Quiz allows you to use quizzes for lead generation by collecting user email address and name. It supports integration with MailChimp and other email marketing service providers. Apart from lead generation, the actual quiz builder features an easy to use interface to build your quizzes.

It uses ajax for faster performance, have multiple themes, social media integration, Open Graph support, and more.

9. Chained Quiz

Chained Quiz

Chained Quiz is a WordPress quiz plugin with the conditional logic feature where the next question in the quiz depends on user’s answer to the previous question. This allows you to create highly interactive personality quizzes that change dynamically.

It supports multiple choice, single choice, and essay answers. You can assign scoring to each correct answer and decide what to do when the user selects an answer.

Which is the Best WordPress Quiz Plugin?

After reviewing each of these plugins, we believe that LearnDash and TryInteract are the most comprehensive quiz building solutions in the market.

If you’re building a LMS website, then we highly recommend you to go with LearnDash.

If you’re looking for a standalone solution to quickly build viral quizzes, then nothing beats TryInteract.

We hope this article helped you find the best quiz plugin for WordPress. You may also want to see our article on how to track user engagement in WordPress with Google Analytics.

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.

The post 9 Best Quiz Plugins for WordPress (2018) appeared first on WPBeginner.

The Best WordPress Themes for Dentists

If you’re a dentist, you’ve probably realized by now that owning a practice and being a great, reliable and professional business owner isn’t enough in today’s world. When everything is happening in the online world, it is necessary that you present yourself in it as well. And, it needs to be a great presentation – ... Read moreThe Best WordPress Themes for Dentists

The post The Best WordPress Themes for Dentists appeared first on Learn WordPress with WPLift.

WordPress Plugin vs Functions.php file (Which is better?)

We are often asked by users whether they should install a WordPress plugin or add code to their theme’s functions.php file? Some users believe that adding code is always the better method for performance, but that’s actually not true. In this article, we will explain the pros and cons of WordPress plugin vs functions.php file and which method is better.

WordPress plugin vs functions file

Installing WordPress Plugins vs Custom Code in Functions.php File

You will often find two solutions to add something to your WordPress site. You can either install a WordPress plugin or add a code snippet to your theme’s functions.php file.

Both methods will do the same thing, and they are both correct. However, many users want to know which one is better for WordPress speed and performance.

Some users feel concerned about installing too many plugins, and how it may affect their website speed and WordPress security. Others worry that adding custom code can break their website, and they may not be able to easily fix it.

Let’s compare both solutions to figure out which one is better for WordPress performance.

Pros and Cons of functions.php File

WordPress functions.php file

Functions file in WordPress allows theme developers to define custom functionality for their theme. This file acts like a giant WordPress plugin and can be used to add any other custom code snippets you may want to add to your website.

Here are the advantages of adding custom code to your theme’s functions.php file.

Pros

  • You can easily use built-in theme editor in admin area to edit functions.php file
  • You can copy and paste all code snippets in one file
  • You get a chance to study the code and learn how it works

However, there are also some disadvantages of using functions.php file to save all your custom functionality.

Cons

  • Your custom code will not work if you switch themes
  • Unless you are using a child theme, updating your theme will overwrite functions.php file
  • It becomes harder to understand where theme code ends and where your custom code begins
  • Some code snippets can be too large and need additional scripts and styles

Understanding Limitations of WordPress Functions File

There are many handy tricks for the WordPress functions file which make it very tempting. However, it is not a replacement for proper WordPress plugins.

Adding code snippets to your functions.php file will have the exact same impact on performance, that a WordPress plugin with the same code would have otherwise.

Not all functionality and features you need can be added to the functions.php file. For example, a custom code may need additional scripts and stylesheets to work properly.

We believe that the theme’s functions.php file should be used for what it’s intended purpose was: theme based functionality added by developers.

Pros and Cons of Installing WordPress Plugins

WordPress plugins

WordPress plugins are like apps for your WordPress website. They contain code that hooks itself to the core WordPress software to provide more features and functionality.

See our article on what are WordPress plugins and how do they work.

Here are some advantages of using a WordPress plugin instead of adding code to your functions file.

Pros

  • A WordPress plugin doesn’t depend on your theme
  • If it is the same code, then it would have the same performance impact as functions file
  • It is easier to disable, update, or reinstall as needed
  • Easier to manage as you know what each plugin does from its description

Now, we are not saying that installing all WordPress plugins is good. There are some disadvantages as well.

Cons

  • You will have to install updates for another plugin
  • Plugin author could abandon the plugin in the future specially if it’s free
  • You wouldn’t get to practice with the code

WordPress Plugin vs Functions File – Which One is Better?

If there is a WordPress plugin with the same code, then we believe that using a plugin is a better choice.

In terms of performance, it does not matter where the code runs. Whether it loads from functions.php file or as a separate plugin, if it is the same code, then it will have the same performance impact.

Managing separate plugins is much easier than editing a single large functions file. Adding random code snippets in the same file even when they are not related or dependant on each other makes things complicated.

If you choose a plugin, then you can benefit from future updates which may improve performance, fix bug, or patch security vulnerability.

When Should I Add Code to Functions.php File?

If the functionality you are trying to add is not available as a plugin and the code snippet is really simple, then you can add it to your theme’s functions file.

Another possible scenario is when you are adding functionality that is related to your WordPress theme or child theme. For example, creating new image sizes, showing dates, adding custom code before or after content, and more.

If you often add custom code snippets to your website, then there are even better ways to do that. You can save them in a site-specific WordPress plugin or use Code Snippets plugin to organize all your custom code.

We hope this article helped you understand WordPress plugin vs functions.php file and which one is better. You may also want to see our beginner’s guide on how to choose the best WordPress plugins for your website.

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.

The post WordPress Plugin vs Functions.php file (Which is better?) appeared first on WPBeginner.

How to Fix the WordPress Failed to Open Stream Error

Are you seeing the ‘failed to open stream’ error in WordPress? This error usually points out the location of the scripts where the error has occurred. However, it is quite difficult for beginner users to understand it. In this article, we will show you how to easily fix the WordPress failed to open stream error.

Failed to open stream error in WordPress

Why Failed to Open Stream Error Occurs?

Before we try to fix the error, it would be helpful to understand what causes the ‘Failed to open stream’ error in WordPress.

This error occurs when WordPress is unable to load the file mentioned in website code. When this error occurs, sometimes WordPress will continue loading the site and only show a warning message, while other times WordPress will show a fatal error and will not load anything else.

The message phrasing will be different depending on where the error occurs in the code and the reason for failure. It will also give you clues about what needs to be fixed.

Typically, this message would look something like this:

Warning: require(/home/website/wp-includes/load.php): failed to open stream: No such file or directory in /home/website/wp-settings.php on line 19 

Fatal error: require(): Failed opening required ‘/home/website/wp-includes/load.php’ (include_path=’.:/usr/share/php/:/usr/share/php5/’) in /home/website/wp-settings.php on line 19

Here is another example:

Last Error: 2018-04-04 14:52:13: (2) HTTP Error: Unable to connect: ‘fopen(compress.zlib://https://www.googleapis.com/analytics/v3/management/accounts/~all/webproperties/~all/profiles?start-index=1): failed to open stream: operation failed’

Having said that, let’s take a look at how to troubleshoot and fix ‘failed to open stream’ error in WordPress.

Fixing Failed to Open Stream Error in WordPress

As we mentioned earlier, the error can be caused by a variety of reasons and the error message will be different depending on the cause and location of the file that’s causing the error.

In each instance, failed to open stream phrase would be followed by a reason. For example, permission denied, no such file or directory, operation failed, and more.

Now if your error message contains ‘no such file or directory’, then you need to look in the code to figure out which file is mentioned at that particular line.

If it is a plugin or theme file, then this means that the plugin or theme files were either deleted or not installed correctly. Simply deactivate and reinstall the theme / plugin in question to fix the error.

However, it is also possible that WordPress is unable to locate the files because of a missing .htaccess file in your root folder. In that case, you need to go to Settings » Permalinks page in your WordPress admin and just click on the ‘Save changes’ button to regenerate the .htaccess file.

Regenerate htaccess file in WordPress

If the error message is followed by ‘Permission denied’, then this means that WordPress does not have the right permission to access the file or directory referenced in the code.

To fix this, you need to check WordPress files and directory permissions and correct them if needed.

Lastly, some WordPress plugins load scripts from third-party sources like Google Analytics, Facebook APIs, Google Maps, and other third-party APIs.

Some of these APIs may require authentication or may have changed the way developers can access them. A failure to authenticate or incorrect access method will result in WordPress failing to open the required files.

To fix this, you will need to contact the plugin author for support. They will be able to help you fix the error.

If none of these tips help you resolve the issue, then follow the steps mentioned in our WordPress troubleshooting guide. This step by step guide will help you pinpoint the issue, so you can easily find the solution.

We hope this article helped you fix the WordPress ‘failed to open stream’ error. You may also want to bookmark our list of the most common WordPress errors and how to fix them.

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.

The post How to Fix the WordPress Failed to Open Stream Error appeared first on WPBeginner.

WP Media Folder Review: Organize Your WordPress Media Library With Folders

When you have hundreds, or even thousands, of files in your WordPress media library, it’s mindbogglingly difficult to find individual files. I have a site that's almost ten years old - it's dang near impossible to find something I uploaded that long ago if I don't remember the exact file name. WP Media Folder fixes this by letting you create folders inside your media library.

The post WP Media Folder Review: Organize Your WordPress Media Library With Folders appeared first on Learn WordPress with WPLift.

How to Convert WooCommerce Visitors into Customers

Do you want to convert WooCommerce visitors into customers? Bringing traffic to your WooCommerce store is only half the battle, the other half is to convert those visitors into paying customers. In this article, we will show you how to easily convert WooCommerce visitors into customers like a pro.

Converting WooCommerce visitors into customers

Why I Need to Conversion Optimization for My WooCommerce Store

Most eCommerce stores rely on search engines or paid advertising campaigns for traffic. There are many other ways to get more traffic to your website.

However, more than 75% visitors who find your website through search engines will never find it again. Those who stick around, only a small percentage of them will add products to the cart.

In the end, more than 69% shopping carts are abandoned without making the purchase. Shipping costs, complicated checkout experience, and bad design are among the top reasons for abandoned carts.

Now, considering these statistics, your eCommerce website will continue losing potential customers if you don’t work on converting those visitors into customers.

How do I Convert Visitors into Customers?

The process and technique that are used to convert visitors into customers is called conversion rate optimization (CRO). Marketers and usability experts use CRO to successfully drive visitors to become a customer or a potential customer.

Basically, you remove obstacles that affect a user’s experience on your website. You also incentivize users to make a purchasing decision.

Lastly if a user must leave without making a purchase, then your goal is to try and get their information through lead generation. This allows you to communicate with them via email and offer personalized messages, special discounts, or new product announcements.

In early days of eCommerce, you would have needed programming skills to work on all these but not anymore. Now you have tools that make it extremely easy to do all these things without writing code or acquiring any new technical skills.

That being said let’s take a look at how to convert WooCommerce visitors into customers.

What You Need to Boost WooCommerce Conversions

First, you will need a WooCommerce store. If you don’t already have one, see our guide on how to create an online store.

This tutorial is about WooCommerce, so we will be using it in our screenshots. However, all these techniques would also work on any other eCommerce platform including Shopify.

We will be using the OptinMonster tool. It is the best conversion optimization software on the market and helps you easily convert WooCommerce visitors into customers.

OptinMonster is a paid service, and you will need at least their Pro plan to access all the features mentioned later in this article.

Ready? let’s begin.

Disclosure: We believe in full transparency. WPBeginner founder, Syed Balkhi, is also the co-founder of OptinMonster. We only recommend tools that we personally use and believe will add value to our readers.

Installing and Setting up OptinMonster

After you have purchased OptinMonster, you will need to install the OptinMonster plugin. For more details, see our step by step guide on how to install a WordPress plugin.

This plugin is just a connector between your WooCommerce store and OptinMonster.

Upon activation, you need to click on the OptinMonster menu item in your WordPress admin sidebar. You will be asked to enter your license key. You can find this information under your account on OptinMonster website.

OptinMonster API Key

You have now successfully connected your WooCommerce store to OptinMonster, and you can now start optimizing your conversion rates.

Creating Your First WooCommerce Conversion Optimization Campaign

Let’s create your first WooCommerce conversion optimization campaign using OptinMonster. Our first campaign will reduce shopping cart abandonment rate while increasing conversions at the same time.

Visit the OptinMonster page in WordPress admin area and then click on ‘Create New Campaign’ button.

Create new campaign button

This will take you to the OptinMonster website where you will be asked to select a campaign type and a campaign template. For this tutorial, you need to select lightbox as your campaign type. We will be using the ‘Coupon’ template in this tutorial, but you can use any template that you like.

Creating new OptinMonster campaign

As soon as you select a template, you will be asked to provide a name for your campaign and enter the website address where you will be using it.

Campaign name and URL

After entering this information, click on the ‘Start Building’ button to continue.

This will launch the OptinMonster builder interface with a live preview of your popup. You can simply point and click on any item to edit it.

Building your optin campaign

As you can see we are using a popup that collects user’s email address. You can connect OptinMonster to your favorite email service provider by clicking on the integrations tab.

Connect to your email service provider

From here you can add a new integration to connect with your email service by following the on-screen prompts.

Next, you need to choose which users will see the popup and when.

Click on the ‘Display Rules’ tab from the left menu, and OptinMonster will show you a list of default display rulesets that you can use.

First, click on the ‘Exit Intent’ ruleset to expand it, and then make sure it is active. Exit-Intent basically detects user’s behavior and prompt them with a message at the precise moment they’re about to leave.

Turn on exit intent

When a visitor adds a product to the cart, WooCommerce automatically sets a cookie ‘woocommerce_items_in_cart’ in their browser with the number of items in their cart.

We only want to show our popup to users who have products in their cart. To do that, scroll down a little and then click on ‘Select visitors with a specific cookie’ ruleset to expand it.

This ruleset allows you to trigger a campaign when a specific cookie is found. From here you need to switch the status toggle to ‘Active’.

WooCommerce cookie tracking in OM

First, option in this ruleset is to show when a cookie name is matched. After that, click on ‘Add a condition’ button and select ‘Cookie value’ does not exactly match 0.

Lastly, click on the save button at the top right corner of the screen to save your changes and then click on the publish button next to it.

Save campaign

Your campaign is now ready to be served on your WooCommerce store. You just need to click on the ‘OptinMonster’ tab in your WordPress admin area and then click on ‘Campaigns’ tab.

You will see the campaign you just created listed there. If you don’t see your campaign, then click on the ‘Refresh campaigns’ button.

Live Campaign

Next, you need to click on the ‘Go Live’ link below your campaign.

That’s all your lightbox popup is live now. To test it out, you will need to open a new browser window in the incognito mode and visit your store. Simply add a few products to your cart and then try to leave.

Abandoned cart campaign preview

Congratulations! you have just set up your first conversion optimization campaign targeting users who are about to abandon their cart and leave without purchasing.

Other Campaign Ideas to Boost WooCommerce Conversions

OptinMonster is a powerful tool with tons of different campaign styles that you can use with a wide range of display rules. This allows you to target customers with highly effective messaging at the perfect time.

Here are some more campaign ideas that can help you boost WooCommerce conversions.

Using Multiple Campaign Types

OptinMonster comes with several campaign styles including lightbox popups, slide-in scroll box, floating bar, countdown timer, sidebar forms, in-line forms, and more.

Campaign types

You can maximize your WooCommerce conversion rates by using multiple campaign types. For example, you can target users leaving your website with an Exit-Intent ® popup while showing other campaigns throughout your store.

Page Level Targeting

OptinMonster allows you to display your campaigns on any page on your website. This page can be a product, product category, a blog post, homepage, or a landing page.

Simply go to OptinMonster page in your WordPress admin area and click on the ‘Edit output settings’ link below your campaign.

Output settings

This will show you a variety of page level targeting options that you can use. It also includes WooCommerce specific targeting options.

Targeting options

Apart from these options, you also have display rulesets in the OptinMonster app which provide even more page level targeting options.

Peronalization and Behavioral Targeting

Personalization helps you improve user experience by making it more personal for each user. Behavioral targetting allows you to target your campaigns based on customer behavior.

For example, you can greet logged in customers with their name, show them products based on their browsing history, offer them discount or coupon.

OptinMonster behavioral targeting

Edit your campaign in the OptinMonster app and click on the ‘Display Rules’ tab. Scroll down to the ‘Who should see the campaign’ section, and you will find a treasure of targeting options.

Click on any of these options to expand them. From here you can activate the ruleset and set it up.

Behavioral targeting options

Using FOMO to Increase WooCommerce Conversions

FOMO or ‘fear of missing out’ is a psychological term used to describe anxiety about missing out on something exciting and trendy.

As an eCommerce store owner, you can take advantage of this human behavior with your marketing strategy and improve your conversions.

Using FOMO in WooCommerce

OptinMonster comes with the countdown timer templates, floating bars, and coupon themes that you can use to build up FOMO in your marketing campaigns.

Combine it with behavioral targeting and customization to make your campaigns even more effective.

For more on this topic, see our article on how to use FOMO on your WordPress site to increase conversions or see these clever FOMO marketing examples from across the web.

We hope this article helped you learn how to convert WooCommerce visitors into customers. You may also want to see our guide on how to enable customer tracking in WooCommerce with Google Analytics.

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.

The post How to Convert WooCommerce Visitors into Customers appeared first on WPBeginner.

MailOptin Review: Flexible Opt-in Forms To Build Your Email List On WordPress

If you want to build a long-term asset for your blog or website, you should build an email list. And if you want to do that, you need a way to display opt-in forms on your WordPress site to actually convince visitors to subscribe. MailOptin helps you do that without leaving your WordPress dashboard. And ... Read moreMailOptin Review: Flexible Opt-in Forms To Build Your Email List On WordPress

The post MailOptin Review: Flexible Opt-in Forms To Build Your Email List On WordPress appeared first on Learn WordPress with WPLift.

How to Add Custom Post Status for Blog Posts in WordPress

Do you want to add a custom post status for your blog posts in WordPress? Post status is an editorial tool that allows you to organize your articles based on their respective stages during the editorial workflow. In this article, we will show you how to easily add custom post status to blog posts in WordPress.

How to add custom post status in WordPress

What is Post Status in WordPress and Why Do You Need it?

Post status is an editorial tool that tells WordPress the stage of a blog post during editing. For example, posts that are incomplete are saved with the post status labeled ‘Draft’. When you publish an article, the status changes to ‘Published’.

Post status

Post status helps WordPress choose how to handle and display blog posts on your website. For example, it will automatically exclude posts labeled draft from your homepage and other publicly viewable areas of your website.

By default, WordPress comes with the following post status that you can use:

  • Draft – An item that is saved but incomplete and not yet published
  • Auto draft – WordPress has an auto-save feature that automatically saves a draft as revision.
  • Pending review – Items that are complete and submitted for review but not yet published.
  • Future – Posts scheduled to be published later.
  • Private – Items marked as private
  • Trash – Items that are trashed
  • Inherit – Child pages that automatically inherit status of their parent page.

Apart from these default post statuses, you can also create your own custom post statuses to improve your editorial workflow. For example, you can add a label ‘Not suitable’ for posts that are complete but not suitable for publication.

Having said that, let’s take a look at how to easily create custom post statuses in WordPress.

Method 1. Create Custom Post Status Using a Plugin

This method is easier and recommended for most users. It allows you to create custom post statuses as well as efficiently manage editorial workflow on your multi-author WordPress blog.

The first thing you need to do is install and activate the Edit Flow plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will add a new menu item labeled ‘Edit Flow’ to your WordPress admin menu. Clicking on it will take you to the plugin’s settings page.

Edit statuses

Edit Flow comes with a lot of useful features, and you can turn them On/Off from this screen. Go ahead and click on the ‘Edit Statuses’ button under ‘Custom Statuses’ box to continue.

Edit Flow automatically creates the following custom post statuses:

  • Pitch – Used to pitch new article ideas and this status also becomes the default post status of every new post.
  • Assigned – You can select an author and mark an article as assigned so that the author can work on it.
  • In progress – Writer is working on the post but is not yet available as a readable draft.

Add new status

You can create your own custom status by providing a name and description in the left column. Once you are done, click on the ‘Add new status’ button to save your changes.

Your custom status will now appear in the right-hand column, so you can edit or delete it at any time.

Edit status

Next, you need to go to Posts » Add New page to create a new post. On the post edit screen, click on the ‘Edit’ link next to status option under the ‘Publish’ meta box.

Select post status

This will reveal a drop-down menu showing all post statuses that you can select including the custom post status you just created.

You can also see all articles filed under different post statuses by visiting Posts » All Posts page.

Sort posts by status

Method 2. Create Custom Post Status Using Code

WordPress has a known bug in the API used to register custom post statuses. It allows you to create custom post status, but you cannot use it in the admin panel. This means that the coding method can get the job done, but it is not as clean, and you will need to change it after it is officially fixed.

However if you still want to do it manually, then you can continue reading.

This method requires you to add code to your WordPress site. If you haven’t done this before, then take a look at our guide on how to copy and paste code in WordPress.

First, you need to add the following code to your theme’s functions.php file or a site-specific plugin.

// Registering custom post status
function wpb_custom_post_status(){
	register_post_status('rejected', array(
		'label'                     => _x( 'Rejected', 'post' ),
		'public'                    => false,
		'exclude_from_search'       => false,
		'show_in_admin_all_list'    => true,
		'show_in_admin_status_list' => true,
		'label_count'               => _n_noop( 'Rejected <span class="count">(%s)</span>', 'Rejected <span class="count">(%s)</span>' ),
	) );
}
add_action( 'init', 'wpb_custom_post_status' );

// Using jQuery to add it to post status dropdown
add_action('admin_footer-post.php', 'wpb_append_post_status_list');
function wpb_append_post_status_list(){
global $post;
$complete = '';
$label = '';
if($post->post_type == 'post'){
if($post->post_status == 'rejected'){
$complete = ' selected="selected"';
$label = '<span id="post-status-display"> Rejected</span>';
}
echo '
<script>
jQuery(document).ready(function($){
$("select#post_status").append("<option value=\"rejected\" '.$complete.'>Rejected</option>");
$(".misc-pub-section label").append("'.$label.'");
});
</script>
';
}
}

Don’t forget to replace all instances of the word rejected with your own custom post status.

This code registers a custom post status and after that, it uses jQuery to add it to the admin panel. You can now edit a WordPress post, and you will be able to see it in the status drop-down menu.

Custom post status shown in admin panel

We hope this article helped you add custom post status to blog posts in WordPress. You may also want to see our list of 55+ most wanted WordPress tips, tricks, and hacks.

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.

The post How to Add Custom Post Status for Blog Posts in WordPress appeared first on WPBeginner.

9 Awesome Places To Find Free Or Premium Elementor Templates For Your Next Site

If this post caught your eye, you’re probably a fan of how easy Elementor makes it to design pages on your WordPress site. But having the power to create drag-and-drop designs is only part of the battle. As every creative knows, staring at a blank page can make it tough to get started. That is, ... Read more9 Awesome Places To Find Free Or Premium Elementor Templates For Your Next Site

The post 9 Awesome Places To Find Free Or Premium Elementor Templates For Your Next Site appeared first on Learn WordPress with WPLift.