As a web developer working with WordPress, troubleshooting errors is part and parcel of your journey. One common error you might come across is the dreaded “502 Bad Gateway” error.
In this tutorial, we’ll dive into the meaning of a 502 Bad Gateway error, provide examples to help you identify it, and offer step-by-step instructions on how to troubleshoot and resolve this issue efficiently.
The 502 Bad Gateway error is an HTTP status code that indicates communication failure between two servers, often a web server (like Nginx or Apache) and an upstream server (like PHP-FPM or a database server).
In the context of WordPress, this error typically arises when your web server cannot receive a valid response from an upstream server. Basically, a 502 bad gateway message indicates that something went wrong while connecting with a device that should fetch all the elements your web page needs to load.
The dreaded 502 Bad Gateway error message.
Common Causes of 502 Errors
Server Overload
When a server is overloaded with too many requests, it can struggle to process them all, leading to delayed or failed responses. This overload could be due to sudden spikes in website traffic, misconfiguration, or inadequate server resources.
DNS Issues
Domain Name System (DNS) issues can lead to a “Bad Gateway 502” error. If the DNS server fails to resolve the domain name, the communication between servers breaks down, triggering the error.
Network Connectivity Problems
Disruptions in network connectivity, such as broken connections or high latency, can also contribute to the occurrence of the “Bad Gateway 502” error.
PHP-FPM or Backend Server Issues
PHP-FPM (PHP FastCGI Process Manager) is a highly efficient and configurable alternative to the traditional way of running PHP scripts on a web server. Instead of having the web server handle PHP scripts directly, PHP-FPM manages a pool of worker processes to handle PHP requests and works as an intermediary between the web server (e.g., Nginx, Apache) and the PHP interpreter.
Handling PHP requests and processing these separately from the web server improves resource management and contributes to better performance and stability in serving dynamic content, such as what’s commonly found in WordPress websites.
If your web server relies on PHP-FPM or any other backend service, issues with these servers can lead to 502 errors.
Database Server Problems
If your WordPress site is connected to a database server (like MySQL), database connection problems can result in a 502 error.
Proxy or CDN Configuration
Incorrect settings or misconfigurations within your content delivery network (CDN) or proxy server can also trigger this error.
Plugins or Themes
Faulty plugins or themes that overload or improperly interact with your server can lead to 502 errors.
Recognizing a Bad Gateway Error
When a 502 Bad Gateway error occurs, users visiting your website might see a message like:
“502 Bad Gateway”
“502 Bad Gateway – nginx”
“502 Proxy Error”
“Bad Gateway: The proxy server received an invalid response from an upstream server.”
Troubleshooting and Resolving Errors
It goes without saying that the best way to prevent most server-related issues is to host your sites with a reliable hosting company.
WPMU DEV not only offers award-winning managed WordPress hosting as voted by users, but all of our hosting plans are also built on a self-healing architecture that proactively attempts to restart hosting services during high server loads to prevent issues and minimize disruptions.
If you are a WPMU DEV member, we also recommend activating Uptime from The Hub. Uptime will alert you if your site goes down for any reason, including issues that can lead to a 502 error.
Uptime alerts you when issues like a 502 error cause your site to go down.
Now, let’s delve into the steps you can take to diagnose and resolve the 502 Bad Gateway error on your WordPress site.
Step 1: Refresh the Page
Sometimes, the 502 error might be transient and can be resolved by simply refreshing the page. This could indicate a temporary server glitch.
Step 2: Check Other Sites
Visit other websites to determine if the issue is isolated to your site or affecting multiple websites. This can help you differentiate between a problem on your end or a more widespread issue.
Step 3: Clear Browser Cache and Cookies
Cached data in your browser might be causing the error. Consider clearing server-side caches (e.g. object cache, static cache etc.), then try accessing your website again.
Step 4: Flush DNS Cache
Flushing your computer’s DNS cache can help resolve DNS-related issues that might contribute to the error. See this guide if you need help.
Step 5: Monitor Server Status
Check the status of your web server, backend servers, and database servers. Look for server load issues or errors in server logs.
Step 6: Review PHP and Backend Configuration
Inspect your PHP-FPM or backend server configuration files. Make sure they are properly configured and functioning as expected.
Step 7: Examine CDN and Proxy Settings
If you’re using a CDN or proxy server, review their settings for any misconfigurations. Ensure that requests are being properly forwarded to your web server. Clearing the CDN cache may also be helpful.
Step 8: Disable Problematic Plugins/Themes
Temporarily deactivate all plugins and switch to a default WordPress theme. Gradually reactivate plugins one by one to identify if any are causing the 502 error.
Step 9: Increase Server Resources
If your server is running out of resources, consider upgrading your hosting plan or optimizing your server settings.
Step 10: Consult Hosting Support
If the error persists and you’re unable to identify the cause, reach out to your hosting provider’s support team. They can provide valuable insights and assistance in resolving the issue.
Preventing and Minimizing 502 Errors
Additional measures to help prevent or minimize potential 502 errors include the following:
1. Optimize Server Performance
Invest in robust server infrastructure and optimize server performance to significantly reduce the likelihood of encountering “Bad Gateway 502” errors.
2. Implement Redundancy
Having backup servers ready to take over in case of failure will help to maintain uninterrupted service and prevent errors.
3. Load Balancers
Implement load balancers to distribute incoming traffic across multiple servers. This reduces the risk of overloading a single server and triggering the error.
4. Content Delivery Networks (CDNs)
CDNs store cached copies of websites on servers located globally. This can enhance website performance and reduce the chances of a “Bad Gateway 502” error. If you’re not using a CDN, consider implementing one in your setup.
5. Regular Server Maintenance
Perform routine server maintenance, including software updates and security checks to prevent unforeseen errors.
6. Monitoring and Alert Systems
Implement monitoring tools and alert systems (e.g. Uptime) to notify administrators of server issues in real-time, allowing for swift intervention and error resolution.
7. Distributed Denial of Service (DDoS) Protection
DDoS protection services can safeguard servers from malicious traffic surges, preventing server overload and potential 502 errors.
8. Implement Graceful Error Handling
Graceful error handling refers to the practice of designing a website or application to handle errors and unexpected situations in a smooth and user-friendly manner.
Custom error pages and graceful error handling can enhance user experience by providing informative messages, clear, human-readable explanations of what went wrong and offering actionable steps to resolve the issue instead of presenting users with the standard error codes, confusing error messages, or technical jargon.
Know What To Do When You Get a 502
Facing a 502 Bad Gateway error in WordPress can be frustrating.
If you experience a 502 error, refer to the above information to help you quickly identify possible causes and solutions. Make sure you’re familiar with WordPress troubleshooting tools and our WordPress troubleshooting guide and follow the steps outlined above to identify and address the root cause of the error to ensure your website remains up and running smoothly for your visitors.
And of course, if you are a WPMU DEV member and need additional help troubleshooting errors, you can always access our 24/7 expert support team anytime for assistance with anything WordPress or hosting-related.
Are you properly tracking user engagement on your WordPress site?
User engagement is one of the most important metrics to track because it helps you better understand your audience and what they want. With Google Analytics, you can easily see how people interact with your website.
In this article, we will show you how to track user engagement in WordPress with Google Analytics.
Why Track User Engagement With Google Analytics?
Generally, WordPress website owners consider traffic and pageviews to be the most important indicators of their website’s performance. They assume that higher traffic will result in more conversions and sales.
While that is generally true, you can get even better results by tracking and optimizing user engagement.
User engagement shows you what users do when they arrive on your website. It helps you identify patterns of highly engaged user behavior that lead to more conversions and sales.
For example, you may realize that users visiting a specific page are 10X more likely to make a purchase than any other visitor on your website. You can use this insight to redirect the user’s attention to that page.
Similarly, tracking engagement can help you see which affiliate links or banner ads your visitors are clicking. Using this data, you will be able to optimize your content to get more clicks and boost conversions.
That said, let’s see how you can set up user engagement tracking in WordPress using Google Analytics.
Tracking User Engagement in WordPress Using Google Analytics
MonsterInsights automatically sets up outbound link tracking, form conversion tracking, scroll depth, affiliate link clicks, and other advanced tracking features in Google Analytics out of the box.
It automates the process of pasting different analytics codes and event tracking in WordPress, so you don’t have to deal with the hassle of code and configuration.
For this tutorial, we will use the MonsterInsights Pro version because it includes advanced tracking features and more dashboard reports. However, there is also a MonsterInsights Lite version that you can use for free and get started with user engagement tracking.
First, you will need to install and activate the MonsterInsights plugin. If you need help, then please see our guide on how to install a WordPress plugin.
Upon activation, you will see the MonsterInsights welcome screen. Go ahead and click the ‘Launch the Wizard’ button. You can then follow the setup wizard to get everything ready in minutes.
Now that you have Google Analytics with MonsterInsights ready to go, let’s take a look at what user engagement metrics are best to track and how you can track them.
These aren’t all of the metrics you can track with MonsterInsights and Google Analytics, but they are the most important ones to start with. You can click the links below to jump ahead to any section:
The first thing you want to figure out is which posts and pages on your WordPress blog are popular amongst your users. These important pages and posts on your website get the most traffic.
Figuring out what your users like on your site can help you plan a content strategy that expands on what’s already working.
MonsterInsights makes it really simple. You just need to visit the Insights » Reports page in your WordPress admin area and go to the ‘Overview’ report.
After that, you can scroll down to see other reports with different data.
You will find your most popular content in the ‘Top Posts/Pages’ section.
On most websites, 90% of the traffic goes to 10% of the top pages and posts.
Once you find these top pages, you can optimize them for maximum conversions by adding content upgrades or targeted lead magnets on these posts.
2. Tracking How Users Engage With Forms on Your Website
Most websites rely on contact forms to collect user leads and feedback. Sadly, most WordPress contact form plugins don’t give you accurate tracking and conversion data.
MonsterInsights lets you leverage the events tracking feature in Google Analytics to see how many times your forms are viewed and submitted.
To enable form tracking, you need to visit the Insights » Addons page. On this page, you will need to install and activate the Forms addon.
Once you have activated the addon, MonsterInsights will automatically start tracking all forms on your website.
You can check these settings by going to Insights » Settings in your WordPress dashboard and then clicking on the ‘Conversions’ tab.
Next, MonsterInsights shows the performance of your WordPress forms inside your dashboard.
Simply go to Insights » Reports from the admin panel and click on the ‘Forms’ tab. The report shows the number of impressions and conversions, as well as the conversion rate for your different WordPress forms.
3. Tracking eCommerce Store Performance in Google Analytics
Google Analytics offers many features specifically for eCommerce websites. However, these features are not turned on by default in Google Analytics, and most users don’t even know that they exist.
eCommerce tracking lets you see shopping behavior, checkout behavior, product performance, sales performance, and so much more. The best part is that you can combine this data with your overall website traffic to gather better insights.
With MonsterInsights, you can easily set up Enhanced eCommerce on your website without editing code. It seamlessly works with popular plugins like WooCommerce, Easy Digital Downloads, GiveWP, MemberPress, and more.
Once you have configured tracking, you can head to Insights » Reports from your WordPress admin menu and click on the ‘eCommerce’ report and select ‘Overview’.
Using the report, you can quickly see how your online store is performing.
It shows stats like conversion rate, number of transactions, revenue, and average order value. It also helps identify products that users engage with the most and where they are coming from.
MonsterInsights also lets you track coupons in your online store.
You can go to eCommerce » Coupons in MonsterInsights reports to view the report.
You can also view the eCommerce report in your Google Analytics property.
Simply visit your Google Analytics account and go to Reports » Monetization » Ecommerce purchases.
Many websites rely on ads to make money online while creating useful content. With Google Analytics, you can actually see how users interact with ads on your site.
For instance, you will be able to track how many clicks each ad is receiving, discover which ads your audience is ignoring, identify the most effective ad placements, and more.
Next, you can link your Google Analytics account with Google AdSense. To do this, log in to your AdSense account and head to Account » Account and Authorization » Google Analytics Integration from the menu on your left.
From here, you can click the ‘+ New link’ button and select your Google Analytics property.
Once your accounts are connected, you can visit Google Analytics to view the reports.
To view your AdSense reports, go to your Google Analytics 4 account and visit Monetization » Publisher Ads.
If you have a Universal Analytics property, then you can view the data by going to the Behavior » Publisher page.
Note: Universal Analytics is no longer collecting your website data. However, you can still access its reports and view old data.
5. Tracking How Far People Scroll Your Website
When tracking user engagement in WordPress, it’s also important to see how far visitors scroll your website.
It gives you insights into how people use your site and helps improve your page length. Plus, you can use the data to place your AdSense ads, call-to-action buttons, and affiliate links where they will get the most visibility and conversions.
MonsterInsights automatically enables scroll-depth tracking. You can view the report by going to Insights » Reports from the WordPress admin panel and clicking the Publishers » Overview tabs.
Next, scroll down and view the ‘Scroll’ report.
It will show the average scroll depth percentage. MonsterInsights will trigger events in Google Analytics 4 as users scroll 25%, 50%, 75%, and 100% of a page and compute the percentage from those results.
6. Tracking Your Affiliate Links in Google Analytics
Most marketers use affiliate plugins to manage and cloak affiliate links. This makes your affiliate links look more user-friendly.
Here is an example of a cloaked affiliate link:
https://example.com/recommends/product-name/
MonsterInsights allows you to track affiliate links in Google Analytics. This data helps you figure out which affiliate products are doing well, which pages are generating more affiliate revenue, and more.
To enable affiliate link tracking, you need to visit the Insights » Settings page. Next, you can switch to the ‘Publisher’ tab and head to the Affiliate Links section.
First, you need to enter the prefix for your link under the Path field, like ‘/refer/’ or ‘/recommend/.’ After that, you must provide a Label that you would like to use for those links in your Google Analytics reports.
When you are done, click on the ‘Save Changes’ button to store your settings.
Next, you can view your top affiliate link clicks in MonsterInsights reports. Simply head to the Publishers tab and scroll down to the ‘Top Affiliate Links’ section.
Here, you will see which affiliate links are getting the most clicks so that you can promote them more on your site and boost sales.
Additionally, MonsterInsights will also show your Top Outbound Links. These are external links that people click and exit your site. You can use insights from this report to get more backlinks, form partnerships, sign up for affiliate programs, and exchange guest posts.
Do have you videos embedded on your WordPress website? If so, then you can track how people engage with them.
With the MonsterInsights Media addon, you can automatically track YouTube, Vimeo, and other HTML 5 video embeds on your website. The best part is that you don’t have to edit code to set up tracking. The plugin takes care of everything.
You can view the data inside your WordPress dashboard. Simply head to Insights » Reports and then click the ‘Media’ tab.
Next, you will see stats about your top videos.
For instance, you can see how many people played the video, the average watch time, the completion rate, and more.
8. Tracking Marketing Campaigns in Google Analytics
If you are running different campaigns on your website, then you can track their performance in Google Analytics. This data helps you see which campaigns get the most engagement so that you can replicate them.
To start, you can add UTM parameters to your campaign links. These are special tags that pass additional information to Google Analytics and help differentiate campaign URLs from regular links.
If you are using MonsterInsights, then you can use the URL Builder tool to create links with UTM parameters. Simply head to Insights » Tools from your WordPress dashboard and select the ‘URL Builder’ tab.
Next, you can fill in the details of your URL.
For instance, you can add your website link, a campaign source like a newsletter, a campaign medium such as email, a campaign name, and other details.
After entering these details, MonsterInsights will create a custom URL with UTM parameters. It will look something like this:
You can simply copy the link and use it in your campaigns.
Once you have added custom links with UTM parameters, MonsterInsights will start to track them in Google Analytics.
You can then view a report inside your WordPress dashboard and see which campaign is generating the most engagement.
Simply head to your MonsterInsights reports and then go to Traffic » Campaigns.
Next, you can scroll down to see campaign details.
The report will show the number of sessions, engaged sessions, purchases, conversion rate, and revenue for each campaign.
9. Tracking Bounce Rate in Google Analytics
The bounce rate is the percentage of users who land on your website and decide to leave without going to a second page.
In the latest version of Google Analytics, you won’t find bounce rate as a default metric that’s visible on your reports. This is one of the key differences you will notice between Google Analytics 4 (GA4) and Universal Analytics.
You will need to manually add the bounce rate to pages and screens reports in GA4. This can be tricky for beginners, especially for anyone who isn’t familiar with the Google Analytics interface.
However, an easier way to view the bounce rate is by using MonsterInsights. Simply go to Insights » Reports from your WordPress admin menu and click on the Publishers » Overview tabs. The plugin shows the bounce rate for your important pages.
A higher bounce rate indicates that you were unable to convince the user to visit other pages. Users can leave your website by clicking on the back button in their browser, clicking on an outgoing link, or closing the window.
Every site has a bounce rate. However, higher bounce rates can indicate problems with your website that are affecting user experience and causing low engagement.
To lower the bounce rate, you can speed up your website, improve internal links, ensure that your content meets the search intent, improve the readability of your articles, show popular posts, and more.
Another indicator that shows user engagement is session duration or the amount of time users spend on your site.
If users are abandoning your site without spending enough time to look at it, then something is wrong, and you need to fix it.
In the MonsterInsights Overview report, you can see the average session duration for your website in the past 30 days.
If you are using Google Analytics 4, then you will see a new metric called average engagement time. It tells you the average time your webpage was being focused on by a user.
You can view the report by logging in to your GA4 account and then heading to Reports » Engagement » Overview.
Using the data, you can better understand your user journey. If the engagement time is low, then you can look into issues like fixing slow site speed, debugging any errors, and making your site’s interface user-friendly.
11. Tracking Pageviews Per Visit With Google Analytics
Pageviews per visit is another excellent indicator of how engaged your users are. A higher number of pageviews per session means that people are visiting multiple landing pages and articles on your site. This helps increase the time users spend on your site and decreases the bounce rate.
In Google Analytics 4, you can view the sessions per user metric based on different traffic sources and see how many pages users view in a single session.
Just head to Reports » Acquisition » User acquisition from your GA4 property.
This helps you see which traffic channels are converting the best for your website. You can then focus your content marketing efforts on areas that are actually driving results.
Universal Analytics will also show you the total page views for a given period on the Audience » Overview page. However, to track engagement, you want to see pageviews per session.
You can also break down page views per session by source and channel.
Simply go to the Acquisition » All Traffic » Channels page.
As a bonus, you can also use the UserFeedback plugin to find out what your visitors really think about your website.
This is something that analytics can’t track.
UserFeedback, built by the MonsterInsights team, lets you easily create popup widgets to collect real-time feedback about your website.
You can ask questions like what information is missing from your site, why users didn’t buy a product, what type of content they are interested in, and more. This will help you better understand intent and improve engagement. There’s also a free version of UserFeedback that you can try out.
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.
Do you want to create an advanced search form in WordPress for custom post types?
If you use custom post types, then you may want to create a form that allows visitors to search only that content. This can help people find what they are looking for and keep them on your site for longer.
In this article, we will show you how to create an advanced search form for custom post types in WordPress, step-by-step.
Why Create an Advanced Search Form for Custom Post Types?
Custom post types allow you to go beyond posts and pages and make different content types for your website. For example, we use custom post types here at WPBeginner to organize our Deals and Glossary sections.
However, WordPress doesn’t include custom post types in its search results by default. As a result, visitors may miss out on important content, and you will miss out on pageviews.
Thankfully, you can include custom post types in your search results using a WordPress search plugin. You can even go one step further and create an advanced form that searches custom post types only.
For instance, at WPBeginner, we have created custom post type search forms on our Deals and Glossary pages.
Often, this kind of advanced search form will help visitors find what they are looking for faster, which will improve the visitor experience and reduce the bounce rate.
First, you can see our guide on how to make custom post types in WordPress. Then, you can jump into our tutorial on how to create an advanced WordPress search form for custom post types.
Create a New WordPress Search Algorithm With a WordPress Plugin
The easiest way to create an advanced search form for custom post types is by using the SearchWP plugin. It’s the best search plugin and allows you to search content that WordPress ignores by default.
The first thing you need to do is install and activate the SearchWP plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, you must go to SearchWP » Settings and click on the ‘General’ tab.
You now need to enter your license in the ‘License Key’ box. You can find this information in your account on the SearchWP site.
Once you are done, make sure to click the ‘Verify Key’ button.
Creating a Custom Search Algorithm
Your next task is creating a custom search algorithm. It allows you to specify the content that SearchWP includes in its search results, like pages, posts, media, and any custom post types.
To get started, you need to go to SearchWP »Algorithm in your WordPress admin dashboard.
Here, you will see a section for every content type that SearchWP includes in its search results.
To add your custom post type, just click the ‘Sources & Settings’ button.
In the popup that appears, check the box next to each custom post type that you want to include in the search results.
After that, click on ‘Done’.
SearchWP will add a new section for each custom post type. Each section shows all the attributes that SearchWP will include in its searches, such as the title, slug, and excerpt.
If you want to add or remove attributes, then simply click on ‘Add/Remove Attributes’.
In the popup, check the box next to each attribute you want to include in the search results.
To remove an attribute, you can uncheck its box instead.
When you are happy with the changes you have made, go ahead and click on ‘Done’.
You will notice that each attribute also has an Application Attribute Relevance slider. This controls how SearchWP ranks the content when building its search results page in WordPress.
If an attribute has high relevancy, then it will have a bigger impact on the search results. By contrast, content that matches an attribute that has less relevancy will appear lower in the search results.
For example, if you move the ‘Title’ slider to the right and the ‘Content’ slider to the left, then a post’s title will carry more weight than the content.
Every WordPress website is unique, so you may want to try different relevancy settings to see what gives you the most accurate and helpful search results.
For example, if you have created a ‘customer reviews’ custom post type for your online store, then this is important content, so you may want to give it a high relevance.
When you are happy with how the search feature is set up, just scroll to the top of the screen and click the ‘Save’ button.
SearchWP will now rebuild the index automatically. Depending on the speed of your Internet connection and your WordPress hosting provider, this may take a few minutes.
As soon as you see ‘Index Status 100%’, you will know that SearchWP has added your custom post types to its search index.
Create an Advanced Search Form for Custom Post Types
With that done, you are ready to make an advanced form that searches your custom post types only.
To get started, head over to SearchWP » Search Forms and click the ‘Add New’ button.
This creates a new form, ready for you to customize.
To give this form a unique name, click on the small pencil icon next to ‘Search Form 1’.
You can now type in a name for the custom search form.
This is just for your reference, so you can use anything that helps you identify the form in your WordPress dashboard. This is particularly important if you plan to create multiple search forms in WordPress.
After that, you can choose the layout you want to use using the ‘Layout Theme’ thumbnails.
Simply click on the different themes to see a preview of how this style will look on your WordPress website.
To create a search form for custom post types, you will typically want to use either ‘Basic’ or ‘Quick Search’.
These styles don’t allow visitors to search by category, which helps to keep them focused on custom post types.
After making your decision, scroll to the ‘Custom Styling’ section.
The settings you see may vary depending on your theme layout. For example, if you selected ‘Quick Search’, then the ‘Quick Search’ setting will be enabled by default.
You can disable and enable the different options using their toggles.
The live preview will update automatically as you make changes, so you can try different settings to see what works the best.
By default, the form will search media, pages, and posts and ignore custom post types. To include custom post types, you need to find the ‘Type of search’ field and give it a click.
You can now type in the name of each custom post type.
When the right post type appears, give it a click to add it to the search.
Do you want to search custom post types only and ignore all other content?
Then just click the small ‘X’ next to ‘Media’, ‘Pages’, and ‘Posts’.
With that done, the form will search your custom post types only.
When you are happy with how the form is set up, scroll to the ‘Form Style’ section. Here, you can choose between different form styles, add a border, change the font size, and more.
Under ‘Button Style’, you can customize the ‘Search’ button that appears in the form.
When you are happy with how the form is set up, scroll to the top of the screen and click on ‘Save’ to store your settings.
How to Add the Custom Post Types to WordPress
Now, you are ready to add the search form to WordPress using either a shortcode or block.
The easiest method is to use a block, so head over to the page or post where you want to add the custom post type form.
You can then click on the ‘+’ icon and type in ‘Search Form’.
When the right block appears, give it a click.
Next, open the ‘Select a Form’ dropdown menu and choose the search form you made during this tutorial.
When you are ready to make the search form live, simply click on either ‘Update’ or ‘Publish’. Now, you can visit your website to see the search form in action.
Another option is to add the search form using a shortcode.
To get the shortcode, you need to head over to SearchWP »Search Forms. Here, find the search form that you want to show and copy the value in the ‘Shortcode’ column.
You can now add the shortcode to any page, post, or widget-ready area. For step-by-step instructions on how to do this, please see our guide on how to add a shortcode in WordPress.
We hope this article helped you learn how to create an advanced search form in WordPress for custom post types. You may also want to see our custom post types tutorials and our expert picks for the best WordPress plugins to grow 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.
Do you want to add a custom post status for your blog posts in WordPress?
Post statuses organize your articles based on where they are in the editorial workflow, such as ‘Drafts’, ‘Pending Review’, or ‘Published’. With the right statuses, you can easily manage your own posts or even blogs submitted by other authors.
In this article, we will show you how to add custom post statuses to blog posts in WordPress.
What Are Post Statuses in WordPress?
Post status allows users to add a workflow status to a blog post. For example, when you are writing a post, you will typically set the status to ‘Draft’. When you publish the post, the status changes to ‘Published’.
You can see the post status of all your blogs by going to Posts » All Posts in your WordPress admin dashboard.
By default, WordPress comes with the following post statuses:
Pending review. A post that’s complete and submitted for review but not yet published. Typically, ‘pending review’ posts need to be reviewed by an editor.
Future. The post is scheduled to be published later.
Private. A blog post that’s not visible to the public. By default, only admins and editors can see private posts created by other users.
Trash. The post is in the trash.
Inherit. Occasionally used when a post inherits the status of its parent page. This is most commonly used for post attachments such as images and videos.
Why Add Custom Post Status for Blog Posts in WordPress?
Sometimes, you may need to add your own custom statuses to WordPress. For example, if you accept guest posts on your WordPress blog, then you might create a ‘User Submitted’ status or a ‘Not suitable’ status for guest blogs that don’t quite fit your website.
This can help you manage all the posts on your WordPress website, even when you are working with dozens of bloggers.
Even if you are a solo blogger, you can use custom statuses to organize your own posts and ideas. For example, you might create a ‘Brainstorm’ status where you record all your ideas directly in the WordPress dashboard.
With that in mind, let’s see how you can add custom post status for blog posts in WordPress.
How to Add Custom Post Status for Blog Posts in WordPress
The easiest way to create custom post statuses in WordPress is by using PublishPress Planner. This free plugin allows you to create as many custom statuses as you want. You can also assign a color and icon to each status and then see this information in the PublishPress editorial calendar.
First, you will need to install and activate the plugin. If you need help, then please see our guide on how to install a WordPress plugin.
Upon activation, you need to go to Planner » Settings. Here, select the ‘Statuses’ tab to get started.
How to Configure the PublishPress Planner Plugin
First, there are a few settings you need to configure.
By default, PublishPress allows you to use the same statuses on pages and posts. However, you may want to use these custom post statuses on only pages or only posts.
To make this change, simply uncheck the box next to ‘Pages’ or ‘Posts’.
If it isn’t already enabled, then you will need to open the ‘Show the status dropdown menu on the post editing screen’ dropdown. Then, select ‘Enabled’. This allows users to change the post status inside the WordPress block editor.
With that done, just click on ‘Save Changes.’
With that out of the way, you are ready to create some custom post statuses.
Customize the Default Post Status for Blog Posts
PublishPress Planner comes with a few built-in statuses that you can add to your WordPress blog posts.
These statuses already have colors and icons assigned.
PublishPress Planner shows this information in its content calendar, as you can see in the following image.
To edit any of these default statuses, simply hover your mouse over it.
Then, click on the ‘Edit’ link when it appears.
This opens an editor where you can change the status name, slug, icon, and color.
When you are happy with your changes, just click on the ‘Update Status’ button.
Do you want to delete a custom post status instead?
Simply hover over it and click ‘Delete’ when it appears.
Create Custom Post Statuses in WordPress
PublishPress also allows you to create your own custom statuses.
To get started, click on the ‘Add New’ tab.
This opens a form where you can type in a name for the status.
This will appear in the page or post editor and also in the ‘Quick Edit’ menu, so it’s a good idea to use something descriptive. This is particularly important if you run a multi-author WordPress blog, as it will help other users understand how to use each status.
Next, you can type in a description, which will appear on the Planner » Content Calendar screen. If you are creating lots of new statuses, then the description can be a helpful reminder for yourself and other users.
If you share your WordPress dashboard with other writers and guest bloggers, then this can also be a good way to share more information about the new workflow.
After that, you can add a color and icon that will represent the status in your content calendar. This can help you plan your content and schedule posts in WordPress.
Simply click on ‘Select Color’ or ‘Select Icon’ and then make your choice in the popup.
When you are happy with how the custom post status is set up, click on ‘Add New Status’.
To create more custom statuses, simply repeat these steps.
How to Add a Custom Status to any Page or Post
After creating one more custom statuses, you can add them to any page or post. If you are inside the content editor, simply open the ‘Post Status’ dropdown in the right-hand menu.
You can then choose the custom post status that you want to use for the WordPress blog post.
Another option is to use the Quick Edit setting. This is a great choice for editors or admins who need to quickly change the status of multiple pages or posts.
To do this, go to either Pages » All Pages, or Posts » All Posts. Then, simply hover your mouse over the item you want to change, and click on ‘Quick Edit’ when it appears.
You can now open the ‘Status’ dropdown and choose the status you want to use.
With that done, click on ‘Update’ to save your settings.
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.
Meet Forminator’s powerful PDF Generator Addon…the simplest, easiest and most automated way to create, edit, and send out form-submitted PDFs without leaving your WordPress dashboard!
Forminator plugin users spoke to us about the challenges they face creating and sending out form-generated PDFs on the fly that seamlessly integrate with their business processes.
For example:
“I would like to send a PDF of our forms with email notifications using Forminator. But I don’t want to use the E2PDF method because it’s too limited for us.â€
“We need to create a form for our user, and generate a PDF after they write on it, and give them the possibility to pay.â€
“Does anyone know how I can generate a PDF from a form submission like Gravity PDF?â€
Forminator users, we heard you!
Forminator Pro now gives you the ability to integrate, create, generate, and automate PDFs using our nifty new PDF generator addon!
Install with just one click and say goodbye to limited free 3rd-party plugins, costly upgrades, and unnecessary integrations!
Built to make it easy for any user to create and customize a PDF file from form submission regardless of their technical level, here are some of the key features of Forminator’s PDF Generator Addon:
Easier PDF Generation
“I am working on a free course for artists who want to start their own websites. They fill out a form and then get a PDF download of their answers. This will serve as a ‘Scope of Work’ for their project.â€
Forminator’s PDF Builder uses the same intuitively easy-to-use drag and drop visual interface as the Form builder, providing a seamless user experience with no additional learning curve required.
In fact, the PDF creation option is part of the Form Builder, so it only takes a couple of clicks to create a PDF file.
Customizable PDFs
Forminator gives users high flexibility by not only making it easy to customize the PDF form structure and layout using its form builder, but also customize PDF content using the Rich Text field, add additional form fields, and insert field tags (see “How to Use” section below).
Autogenerated PDFs
PDFs can be autogenerated from your existing form structure and form fields, so you don’t need to create your PDF from scratch.
However, Forminator is flexible enough so that if you want to design your PDF fom scratch, you can.
Attach PDFs to Emails
“It would be great if PDFs could be created of the form submissions and could be attached and sent over emails.â€
You can send customized email notifications to admins and visitors with PDF attachments automatically. (see “How to Use” section below.)
Downloadable PDFs
Download the PDFs of the form submissions on the Submissions page.
Unlimited PDFs
No limits on usage of fields, number of pages, or number of PDFs.
PDFs and More PDFs
Create multiple PDFs on the same form.
PDF Templates
Generate PDF files for payment receipts, invoices, and quotations in seconds with easy-to-use pre-designed templates. (Coming soon!)
We also have loads more features coming soon (e.g. payment and quotation fields, more settings to customize PDF form appearance with colors and fonts, allowing form submitters to download PDFs after submission, etc.), so watch this space!
How to Use Forminator’s PDF Generator Addon
As mentioned earlier, one of the key features of Forminator’s PDF Generation Addon is that it works just like the plugin’s Form builder, so once you’ve installed it, configuring your PDF forms is so easy.
Note: This is a Pro feature, so make sure you have Forminator Pro installed, or consider becoming a WPMU DEV member if you are currently using our free Forminator plugin.
Creating PDFs
To create PDFs, first make sure to install the addon. You can do this from your WPMU DEV Dashboard plugin, or by going to Forminator Pro > Add-ons .
Install the PDF Generator from Forminator Pro’s Add-Ons section.
Note: to use the PDF Generator Addon, make sure that you have created at least one form on your site. Remember too, that you can generate multiple PDF files for the same form.
Once the add-on has been installed and activated, edit the form you want to attach a PDF to, and in the Edit Form > PDF section, click on Create New PDF.
Create a new PDF in Forminator’s Edit Form > PDF section.
Give your new PDF a filename and click the + Create button.
Give your PDF a name for internal identification purposes.
Next, choose a template for your PDF. Note: As we develop this feature further, we’ll be adding all kinds of new templates to this section for generating PDF receipts, quotations, etc.
After selecting your template, click the Continue button.
Forminator Pro users can choose from a range of professionally designed PDF templates.
The Preload PDF Content modal gives you the choice of preloading form fields into your new PDF file, or creating your PDF from scratch.
Choose an option and click the Continue button to proceed.
Forminator gives you the choice of preloading form fields or starting with a blank file.
Once your PDF file is created, you can edit it or continue the setup process.
Once your PDF file is created, you can edit it or continue building your form.
If you selected the Preload Form Fields in PDF File option, the fields in your form will load in your PDF file.
Editing PDFs
While the Page Header and Page Footer elements are static and cannot be moved, you can edit the settings and style for all fields by clicking on the gear icon to the right of the fields.
You can also rearrange non-static fields using drag and drop to fully customize the layout of your PDF.
Insert, edit, and preview your form fields.
As well as preloading form fields, you can insert additional fields to add custom text and labels, add page breaks to create multipage PDFs, insert payment and quotation fields, and more.
There are many PDF form field options to choose from.
Note: To add custom text in your forms, use the Rich Text field. Use either a label for the field, or hide the label and add your own text with formatting options like bold, italics, bullet points, and hyperlinks.
You can also insert form fields into the text area to create a customized PDF template that will autopopulate your form details when generated.
Use the Rich Text field to format and style your form field content.
Additionally, you can adjust the appearance of your PDFs using appearance options, which allow you to control how your PDFs will look and their layout.
The Page settings section lets you set the page size from a dropdown menu, with the recommended default being A4. The default page margin is 30 pixels, and you can change this under the Custom tab.
You can also enable the RTL (Right-to-Left) option to output your PDF in languages like Arabic, Hebrew, Farsi, Urdu, etc., and if you’re familiar with CSS, you can use the Custom CSS option to further customize your PDF. Many selectors are included to help you, and if you need further assistance, make sure to contact our 24/7 Live Support team.
After creating or editing your PDF, you can save it as a Draft to continue working on it at a later time. You can also preview, edit, or delete it, and publish or unpublish it.
A Forminator Form with a Forminator generated PDF.
Emailing PDFs
With Forminator’s PDF Generator Addon, attaching PDFs to emails is really simple and easy.
After creating your PDF form, go to Forminator > Edit Form > Email Notifications and select the PDF file(s) to attach to the email notification you have set up.
Select one or more PDFs to attach to the email.
Note: You can also set up conditional email rules to automatically send specific PDFs to specific users.
Use the power of conditional emails to send PDFs to specific users.
Downloading PDFs
You can download PDFs on form submissions from the Submissions page for forms with PDF templates. There are no restrictions on the number of PDFs you can download.
If you have more than one PDF template available for a single form, you can download the form submission PDF for each template separately or the PDFs of all the templates as a zip file.
Download PDFs for all submission forms.
For full details on using the PDF generator addon and all of its features refer to our Forminator documentation.
With Forminator Pro, You Can’t Go PDF’ing Wrong!
Forminator Pro’s new PDF generator allows you to generate an unlimited number of PDFs with your forms and form submissions, customize, edit, and style PDF templates, and a whole lot more.
If you are a WPMU DEV member, there is nothing else you need to purchase to start generating professional PDFs. Simply install the addon in Forminator, tweak the appearance and settings in your forms, and you’re all good to go.
If you’re not a member yet, consider choosing one of our risk-free membership options (Pro or Agency). You’ll not only get all of our Pro plugins, you’ll also get access to everything else you need to use PDFs effectively, including site management, client report, and client billing tools, white label and reseller options, 24/7 expert support on all areas related to WordPress, CSS, hosting, etc, and so much more!
Start using Forminator’s PDF Generator Addon today…it’s PDF’ing great!
Meet Forminator’s powerful PDF Generator Addon…the simplest, easiest and most automated way to create, edit, and send out form-submitted PDFs without leaving your WordPress dashboard!
Forminator plugin users spoke to us about the challenges they face creating and sending out form-generated PDFs on the fly that seamlessly integrate with their business processes.
For example:
“I would like to send a PDF of our forms with email notifications using Forminator. But I don’t want to use the E2PDF method because it’s too limited for us.â€
“We need to create a form for our user, and generate a PDF after they write on it, and give them the possibility to pay.â€
“Does anyone know how I can generate a PDF from a form submission like Gravity PDF?â€
Forminator users, we heard you!
Forminator Pro now gives you the ability to integrate, create, generate, and automate PDFs using our nifty new PDF generator addon!
Install with just one click and say goodbye to limited free 3rd-party plugins, costly upgrades, and unnecessary integrations!
Built to make it easy for any user to create and customize a PDF file from form submission regardless of their technical level, here are some of the key features of Forminator’s PDF Generator Addon:
Easier PDF Generation
“I am working on a free course for artists who want to start their own websites. They fill out a form and then get a PDF download of their answers. This will serve as a ‘Scope of Work’ for their project.â€
Forminator’s PDF Builder uses the same intuitively easy-to-use drag and drop visual interface as the Form builder, providing a seamless user experience with no additional learning curve required.
In fact, the PDF creation option is part of the Form Builder, so it only takes a couple of clicks to create a PDF file.
Customizable PDFs
Forminator gives users high flexibility by not only making it easy to customize the PDF form structure and layout using its form builder, but also customize PDF content using the Rich Text field, add additional form fields, and insert field tags (see “How to Use” section below).
Autogenerated PDFs
PDFs can be autogenerated from your existing form structure and form fields, so you don’t need to create your PDF from scratch.
However, Forminator is flexible enough so that if you want to design your PDF fom scratch, you can.
Attach Emails to PDFs
“It would be great if PDFs could be created of the form submissions and could be attached and sent over emails.â€
You can send customized email notifications to admins and visitors with PDF attachments automatically. (see “How to Use” section below.)
Downloadable PDFs
Download the PDFs of the form submissions on the Submissions page.
Unlimited PDFs
No limits on usage of fields, number of pages, or number of PDFs.
PDFs and More PDFs
Create multiple PDFs on the same form.
PDF Templates
Generate PDF files for payment receipts, invoices, and quotations in seconds with easy-to-use pre-designed templates. (Coming soon!)
We also have loads more features coming soon (e.g. payment and quotation fields, more settings to customize PDF form appearance with colors and fonts, allowing form submitters to download PDFs after submission, etc.), so watch this space!
How to Use Forminator’s PDF Generator Addon
As mentioned earlier, one of the key features of Forminator’s PDF Generation Addon is that it works just like the plugin’s Form builder, so once you’ve installed it, configuring your PDF forms is so easy.
Note: This is a Pro feature, so make sure you have Forminator Pro installed, or consider becoming a WPMU DEV member if you are currently using our free Forminator plugin.
Creating PDFs
To create PDFs, first make sure to install the addon. You can do this from your WPMU DEV Dashboard plugin, or by going to Forminator Pro > Add-ons .
Install the PDF Generator from Forminator Pro’s Add-Ons section.
Note: to use the PDF Generator Addon, make sure that you have created at least one form on your site. Remember too, that you can generate multiple PDF files for the same form.
Once the add-on has been installed and activated, edit the form you want to attach a PDF to, and in the Edit Form > PDF section, click on Create New PDF.
Create a new PDF in Forminator’s Edit Form > PDF section.
Give your new PDF a filename and click the + Create button.
Give your PDF a name for internal identification purposes.
Next, choose a template for your PDF. Note: As we develop this feature further, we’ll be adding all kinds of new templates to this section for generating PDF receipts, quotations, etc.
After selecting your template, click the Continue button.
Forminator Pro users can choose from a range of professionally designed PDF templates.
The Preload PDF Content modal gives you the choice of preloading form fields into your new PDF file, or creating your PDF from scratch.
Choose an option and click the Continue button to proceed.
Forminator gives you the choice of preloading form fields or starting with a blank file.
Once your PDF file is created, you can edit it or continue the setup process.
Once your PDF file is created, you can edit it or continue building your form.
If you selected the Preload Form Fields in PDF File option, the fields in your form will load in your PDF file.
Editing PDFs
While the Page Header and Page Footer elements are static and cannot be moved, you can edit the settings and style for all fields by clicking on the gear icon to the right of the fields.
You can also rearrange non-static fields using drag and drop to fully customize the layout of your PDF.
Insert, edit, and preview your form fields.
As well as preloading form fields, you can insert additional fields to add custom text and labels, add page breaks to create multipage PDFs, insert payment and quotation fields, and more.
There are many PDF form field options to choose from.
Note: To add custom text in your forms, use the Rich Text field. Use either a label for the field, or hide the label and add your own text with formatting options like bold, italics, bullet points, and hyperlinks.
You can also insert form fields into the text area to create a customized PDF template that will autopopulate your form details when generated.
Use the Rich Text field to format and style your form field content.
Additionally, you can adjust the appearance of your PDFs using appearance options, which allow you to control how your PDFs will look and their layout.
The Page settings section lets you set the page size from a dropdown menu, with the recommended default being A4. The default page margin is 30 pixels, and you can change this under the Custom tab.
You can also enable the RTL (Right-to-Left) option to output your PDF in languages like Arabic, Hebrew, Farsi, Urdu, etc., and if you’re familiar with CSS, you can use the Custom CSS option to further customize your PDF. Many selectors are included to help you, and if you need further assistance, make sure to contact our 24/7 Live Support team.
After creating or editing your PDF, you can save it as a Draft to continue working on it at a later time. You can also preview, edit, or delete it, and publish or unpublish it.
A Forminator Form with a Forminator generated PDF.
Emailing PDFs
With Forminator’s PDF Generator Addon, attaching PDFs to emails is really simple and easy.
After creating your PDF form, go to Forminator > Edit Form > Email Notifications and select the PDF file(s) to attach to the email notification you have set up.
Select one or more PDFs to attach to the email.
Note: You can also set up conditional email rules to automatically send specific PDFs to specific users.
Use the power of conditional emails to send PDFs to specific users.
Downloading PDFs
You can download PDFs on form submissions from the Submissions page for forms with PDF templates. There are no restrictions on the number of PDFs you can download.
If you have more than one PDF template available for a single form, you can download the form submission PDF for each template separately or the PDFs of all the templates as a zip file.
Download PDFs for all submission forms.
For full details on using the PDF generator addon and all of its features refer to our Forminator documentation.
With Forminator Pro, You Can’t Go PDF’ing Wrong!
Forminator Pro’s new PDF generator allows you to generate an unlimited number of PDFs with your forms and form submissions, customize, edit, and style PDF templates, and a whole lot more.
If you are a WPMU DEV member, there is nothing else you need to purchase to start generating professional PDFs. Simply install the addon in Forminator, tweak the appearance and settings in your forms, and you’re all good to go.
If you’re not a member yet, consider choosing one of our risk-free membership options (Pro or Agency). You’ll not only get all of our Pro plugins, you’ll also get access to everything else you need to use PDFs effectively, including site management, client report, and client billing tools, white label and reseller options, 24/7 expert support on all areas related to WordPress, CSS, hosting, etc, and so much more!
Start using Forminator’s PDF Generator Addon today…it’s PDF’ing great!
Do you want to make multiple search forms in WordPress?
By default, a search form will look through all your pages, posts, and media on your website. However, you can often improve the visitor experience by creating multiple forms that search specific categories, content types, and more.
In this article, we will show you how you can add and use multiple search forms on your WordPress site.
Why Use Multiple Search Forms in WordPress?
A search form can help visitors find what they are looking for, fast. However, if you have lots of content, then it might make sense to create multiple forms that search specific types of content.
By using different search forms in different locations across your site, you can help visitors get accurate and helpful search results, no matter how much content you have published. This will improve the visitor experience and reduce the bounce rate.
That being said, let’s show you how to create multiple search forms in WordPress.
Create a New WordPress Search Algorithm With a WordPress Plugin
The easiest way to add multiple search forms to your WordPress website is by using the SearchWP plugin. It’s one of the best search plugins for WordPress, used by over 30,000 sites.
With SearchWP, you can search content that WordPress ignores by default, including custom post types, PDF files, WooCommerce products, and categories. You can also create multiple different search forms and then add those forms to any page, post, or widget-ready area.
Setting Up SearchWP
The first thing you need to do is install and activate the SearchWP plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, go to SearchWP » Settings and then click on the ‘General’ tab.
With that done, just click the ‘Verify Key’ button.
Create a Custom Search Algorithm For WordPress
After entering the license key, it’s a good idea to fine-tune how SearchWP indexes, searches, and displays your content. You can think of this as creating a custom Google search algorithm that’s just for your WordPress blog or website.
These are the general settings that all search forms will use by default. You can override these settings for the individual search forms.
To get started, head over to SearchWP »Algorithm.
Here, you will see a section for the different content types that SearchWP searches by default, such as pages and posts.
You will notice that each item has an ‘Applicable Attribute Relevance’ scale. This is the weight (importance) that SearchWP will give to each attribute.
Content that matches an attribute with high relevancy will appear higher in the search results. By contrast, content that matches an attribute that has less relevancy will appear lower on the search results page.
To change the relevancy, simply drag the different sliders. For example, if you move the ‘Title’ slider to the left and the ‘Content’ slider to the right, then the content will carry more weight than the title.
You can even tell SearchWP to search content that WordPress ignores by default.
To do this, click on the ‘Sources & Settings’ button.
When you are happy with your changes, simply click on the ‘Done’ button.
This adds a new section for each content type. Once again, you can change the attribute relevance using the different sliders.
When you are happy with how the search algorithm is set up, just scroll to the top of the screen and click the ‘Save’ button.
SearchWP will now rebuild the index automatically. Depending on the speed of your Internet connection and your WordPress hosting provider, this may take a few minutes.
As soon as you see ‘Index Status 100%’, you will know that SearchWP has indexed all your content and settings.
Create Multiple Different Search Forms in WordPress
Now, you can create as many different search forms as you want.
To get started, head over to SearchWP » Search Forms and click the ‘Add New’ button.
This creates a new search form, ready for you to customize. For example, if you run a review website, then you might create a form that searches for product review posts and ignores other content like your blog posts and media.
To start, you will need to give the form a unique name by clicking on the small pencil icon next to ‘Search Form 1’.
You now type in a name for the custom search form.
Since you are going to make multiple search forms in WordPress, it’s important to use a name that helps you identify this form in the WordPress dashboard.
After that, you can choose a layout using the ‘Layout Theme’ thumbnails.
Some of these layouts are designed for specific search forms. For example, if you are creating a form that searches by category in WordPress, then we recommend selecting ‘Category Search’, as it already has many of the settings you need.
Simply click on the different themes to see a preview of how this form will look on your website. After making your decision, scroll to the ‘Custom Styling’ section.
The settings you see may vary depending on your theme layout. For example, if you selected ‘Quick Search’, then the ‘Quick Search’ setting will be enabled by default.
You can disable and enable the different options using their toggles. The live preview will update automatically as you make changes, so you can try different settings to see what works the best.
Depending on your layout and the kind of form you want to create, you may need to enable and disable some of the ‘Custom Styling’ settings.
Do you want to create a form that searches by category? Then you will need to enable the ‘Category Search’ toggle.
After that, find the ‘Select Category’ field and type in each category that you want to include in the search results. For example, if you run an online store, then you may want to create forms that search specific WooCommerce product categories.
If you want to allow visitors to filter their search results using factors like the author, post type, and tag, then you will need to click to enable the ‘Advanced Search’ toggle.
After that, scroll to the ‘Advanced Search Filter/s’ field. By default, SearchWP allows visitors to filter their results using Authors, Post Types, and Tags.
To remove any of these filters, just click on its ‘X’ button. If you want to add more filters, then simply type their names into the field.
Then, when the right option appears in the dropdown, give it a click.
By default, the form will search media, pages, and posts. If you have created custom post types, then you may want to include these in the search results.
To do this, find the ‘Type of search’ field and give it a click.
You can now type in the name of each custom post type.
When the right custom post type appears, click to add it to the search.
Do you want to exclude media, pages, or posts from the search results?
Then just click the small ‘X’ next to ‘Media’, ‘Pages’, or ‘Posts’.
When you are happy with the type of content that SearchWP will search, you may want to add some placeholder text to the search bar.
Here, we recommend letting visitors know how the search form works and the results they should expect to get. For example, if you have an online marketplace, then you may want to use text such as ‘Search for products’ or ‘Start shopping’.
By default, SearchWP will show a generic ‘Enter keyword and search’ message. You can replace this with your own messaging by typing into ‘Field Label’.
By default, the search form shows a magnifying glass and a blue ‘Search’ button.
To remove the ‘Search’ button, simply click to deactivate the ‘Search Button’ toggle.
When you are happy with these settings, scroll to the ‘Form Style’ section.
Here, you can choose between different form styles, add a border, and change the font size.
Under ‘Button Style,’ you can customize the ‘Search’ button that appears in the form.
Finally, when you are happy with how the form is set up, you can scroll to the top of the screen and click on ‘Save’ to store your settings.
To create more custom search forms with unique settings, simply repeat the exact same process described above.
Add Multiple Search Forms to Your WordPress Site
You can add multiple search forms to any page, post, or widget-ready area using either a shortcode or the Search Form block.
Since it’s the easiest, let’s start by looking at the block method.
How to Add Search Forms to a Page or Post
You may want to add a search form to a specific page or post or even show it inside the post content.
For example, you might add a search form to your FAQ page, documentation, help desk, knowledge base, or similar. This can improve the customer experience by helping users find answers and useful resources.
To get started, simply head over to the page or post where you want to add the form.
You can then click on the ‘+’ icon and type in ‘Search Form’.
When the right block appears, give it a click.
You can now open the ‘Select a Form’ dropdown and choose the form you want to show on this page or post.
When you are ready to make the search form live, just click on either ‘Update’ or ‘Publish’. Now, simply visit this page or post to see the search form in action.
How to Add Search Forms to a Widget-Ready Area
Another option is to add a search form to a widget-ready area, such as the sidebar or similar section. This is an easy way to show the same search bar across multiple pages on your WordPress website.
Go to Appearance » Widgets to see all the different areas where you can add widgets.
The options you see may vary depending on your WordPress theme. For example, if you are using the Astra theme, then the sidebar widget area is called ‘Main Sidebar’.
Simply click the ‘+’ block icon in the area where you want to add a widget.
Then, type in ‘Search Form’.
When the right block appears, click to add it to your website.
You can now open the dropdown menu and choose the search form that you want to use.
When you are finished, just click the ‘Update’ button to make the search form live.
Now, you can visit your site to see the improved search form.
How to Add Search Forms Using the Full Site Editor
If you are using a block WordPress theme, then you can add search forms using the full site editor. It includes areas that you can’t edit using the standard WordPress content editor. For example, you can add a search form to your 404 template in WordPress.
To get started, head over to Appearance » Editor in the WordPress dashboard.
By default, the full site editor shows your theme’s home template, but you can add a search form to any template.
In the left-hand menu, simply click on ‘Templates’ or Template Parts’ depending on where you want to add the search form.
You will now see a list of all the templates that make up your WordPress theme.
Simply find the template or template part that you want to edit, and give it a click.
WordPress will now show a preview of this template.
To go ahead and edit the template, click on the small pencil icon.
Now, click on the ‘+’ icon.
In the panel that appears, type in ‘Search Form’.
When the right block shows up, drag and drop it into your layout.
You can now open the dropdown menu and choose the search form that you want to use.
With that done, just click on the ‘Save’ button to make your changes live.
How to Add a Search Form to WordPress Using a Shortcode
Another option is to add a search form using its shortcode. This may be an easier option if you want to add the same search form to multiple pages, posts, or widget-ready areas, as you can simply paste the same shortcode into multiple locations.
To get a search form’s shortcode, head over to SearchWP »Search Forms. Here, find the search form that you want to show and copy the value in the ‘Shortcode’ column.
You can now add the shortcode to any page, post, or widget-ready area. For step-by-step instructions, please see our guide on how to add a shortcode in WordPress.
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.
Are you wondering how to add push notifications to your WordPress site?
Push notifications let you send messages to users even when they are not on your website. This helps you bring back users to your website, increase traffic, and make more money.
In this article, we will show you how to easily add web push notifications to your WordPress site.
We will cover everything you need to know about sending push notifications in our tutorial, and you can use the quick links below to jump to different sections:
Push notifications are short, clickable notification messages that appear as a popup on users’ desktop or mobile devices.
They display on top of the desktop or in the notification area on a mobile device. The best thing is that they can be shown even when the user’s browser is not open.
Here’s an example of a push notification.
Push notifications let you reach users across devices with your latest updates and offers, making them an effective way to convert website visitors into loyal followers and customers.
Why Add Web Push Notifications to Your WordPress Site?
Did you know that 70% of people who leave your website will never come back? This is why you need to convert those WordPress website visitors into subscribers and customers.
You can do this by using multiple channels at once. These can include email marketing, social media, mobile or SMS marketing, and web push notifications.
Email lists are still the most powerful marketing tools available, with 51% of consumers preferring to be contacted by businesses via email. However, we are finding that push notifications are also very effective.
On the WPBeginner site, push notifications are consistently one of the top 5 traffic sources.
Here are just some of the reasons that make push notifications a great marketing tool:
Users need to give their explicit permission to receive push notifications. This means they are already interested in what you have to offer and are more likely to engage with notifications.
Push notifications are shorter and demand less attention than email or social media updates.
There is no algorithm like on social media to limit your reach. Nearly 100% of messages are delivered.
Users can control how their devices display notifications. They can snooze them or turn them off entirely.
Not as many companies are using push notifications.
Popular sites, including Facebook, Pinterest, LinkedIn, and many others, understand the importance and are already using web push notifications as a marketing strategy.
Push notifications have a 10X higher open rate than email and a 14X higher click rate. They are more engaging than SMS, email marketing, and social media platforms.
Having said that, let’s take a look at how to easily add web push notifications to a WordPress website.
Setting Up Web Push Notifications in WordPress With PushEngage
This helps you connect with visitors even after they leave your site with targeted push messages.
Step 1: Creating Your PushEngage Account
First, you need to go to the PushEngage website and click the ‘Get Started For Free Now’ button.
The free plan covers you for up to 200 subscribers and 30 notification campaigns each month. You will have to upgrade as you get more subscribers and need to send more campaigns.
After selecting a pricing plan, you will need to create a PushEngage account. You can use your existing Google account to register or create a new account.
Once you do that, you will be taken to the ‘Setup Your Account’ page, where you have to add your website domain, industry, and company size.
Your subdomain will automatically be generated according to this information. After that, you will also need to provide your credit card details here.
Upon signing up, you will be taken to your PushEngage dashboard.
Keep in mind that if you signed up using your Google account, then this is where you will need to provide your website details.
Once you have done that, just visit the Site Settings » Site Details page from the left column in the PushEngage dashboard.
From here, you can edit your site name and URL if you want. After that, you myst upload an image that will be used as a site icon for your web push notifications.
To do this, click the ‘Choose Image’ button.
This will open up a prompt on your screen where you can upload an image from your computer.
You can also add an image using its URL. Once you have selected an image, just click the ‘Use’ button.
After that, don’t forget to click the ‘Save Changes’ button to store your settings.
Remember that your image needs to be in PNG or JPG file format, and the recommended size is 192×192.
You have now completed the key information for your PushEngage account.
Step 2: Connecting Your WordPress Site With PushEngage
The next step is to connect your WordPress website to PushEngage.
Upon activation, the ‘Welcome to PushEngage Setup Wizard!’ prompt will open up on your screen, where you have to click the ‘Connect Your Existing Account’ button.
This will open the ‘Add Your Site to PushEngage’ prompt in a new window. Here, you have to make sure that the site registered with PushEngage is the same one that you are using now.
After that, just click the ‘Let’s Get Started’ button.
Once your PushEngage account is connected with WordPress, a setup wizard will be launched on your screen that you can configure according to your liking.
After you are done, just click the ‘PushEngage Dashboard’ button to be redirected to your WordPress dashboard.
Now it’s time for you to start creating a web push notification for your WordPress blog or website.
Step 3: Setting Up Your Push Notification Messages
To create a push notification, head over to the PushEngage » Campaigns page and click the ‘Add New’ button.
This will direct you to the ‘Create New Push Broadcast’ screen in your WordPress dashboard.
From here, you can start by typing a name for your push notification in the ‘Notification Title’ field. Then, type the message that you want to display in the push notification in the ‘Message’ field.
Next, you need to add your website URL to the ‘Notification URL’ field.
Upon adding the title and message, you will be able to see the preview of your push notification in the right corner of the screen.
Next, scroll down to the ‘Show Large Image’ section and toggle the switch to active if you want to add an image to your push notification.
This image will be displayed at the top of your notification and will not disturb the alignment of the notification title and message.
Next, you need to scroll down to the ‘Notification Duration’ section and toggle the switch to active.
Once you do that, you can now check the ‘Keep notification open until interaction’ option. This means that the notification will be constantly displayed unless the user interacts with it.
You can also customize your push notification duration from the dropdown menus. This setting controls how long the push notification will be displayed for.
Keep in mind that these features only work for Chrome 47 and above versions and not other browsers.
After configuring the settings, just click the ‘Save & Select Audience’ button at the top.
This will direct you to the next step, where you must select the audience that you want to send push notifications to.
Here, we will be choosing the ‘Send to All Subscribers’ option so that our push notification will be displayed to all our subscribers.
Next, click the ‘Send/Schedule’ button at the top to move forward.
In the next step, you need to schedule your web push notification timing.
For example, if you want to start sending your push notifications immediately, then you can select the ‘Begin sending immediately’ option. However, you can also schedule your notification to be sent at a particular time or be turned into a recurring push notification.
Although, keep in mind that you will need a paid plan from PushEngage to access these two features.
Finally, click the ‘Send Notification Now’ button to save your campaign and start sending your web push notifications.
Once you have set up push notifications, it’s best practice to check that they are working as you expected.
To test your push notifications, open your website on your computer or phone. Here, you should immediately see the web push notification that you just created.
Here’s ours on a desktop computer:
However, keep in mind that this web push notification will only be displayed to users who are part of your PushEngage subscriber list.
Create a Subscribers List With PushEngage
If you don’t already have a subscribers list with PushEngage, then you must visit the PushEngage » Design page from the WordPress admin sidebar.
Once you are there, simply toggle the switch to active for a popup template that you like. Then, click the ‘Edit Popup’ button.
This will open the PushEngage website dashboard on a new page.
From here, you can configure the layout, message, and subscription rules for your popup.
Once you are done, don’t forget to click the ‘Save & Choose Display Options’ button at the top.
This will now show you the display options, where you can choose the cookie duration, enable the subscription trigger, and more.
Finally, click the ‘Save and Enable Popup’ button to store your settings and activate the popup.
Now, you need to visit your website using another Google account. Here, you will see a popup at the top of your website asking users to allow it to show notifications.
Now once the users will click the ‘Allow’ button, they will automatically become a part of your PushEngage subscribers’ list.
Send Push Notifications to Subscribers Every Time You Publish a New Post on WordPress
With PushEngage, you can also send push notifications to subscribers every time you publish a blog post in WordPress.
To do this, visit the PushEngage » Settings page from the WordPress dashboard and switch to the ‘Auto Push Settings’ tab. From here, toggle the ‘Auto Push’ switch to active.
After that, you need to choose if you want to display the post’s featured image in the push notification and enable multi-action buttons.
With multi-action buttons, you can allow users to interact with your push notifications in multiple ways, like visiting your blog post, subscribing to your YouTube channel, and signing up for your email newsletter.
You can also use the blog post’s featured image or the site icon as the notification icon image.
Finally, click the ‘Save Changes’ button to store your settings.
Now create a new post in the WordPress block editor and scroll down to the ‘PushEngage Push Notifications Settings’ section.
From here, you can add a title and message for your web push notification and even select an audience for it.
Once you are done, simply click the ‘Publish’ button to save your changes and make your post live.
Now your subscribers will receive a notification for the new blog post on 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.
Do you want to redirect your 404 page to your home page in WordPress?
Redirecting the 404 ‘Not Found’ page to your website’s home page can help reduce your bounce rate and allow your users to discover other useful content on your website.
In this article, we will show you how to redirect your 404 page to your home page in WordPress.
Why Redirect Your 404 Page to Your WordPress Home Page?
When a user tries to visit a page that doesn’t exist on your WordPress website, WordPress will show them a 404 error page instead.
The wording and appearance of this page can vary depending on the theme you are using.
Most users who land on the default 404 page will leave your site quickly. This can increase your overall bounce rate and negatively impact your search engine rankings.
That’s why you should take the time to create a custom 404 page. However, until you do that, you can take the shortcut in this tutorial and redirect users to the homepage.
That being said, let’s look at how to redirect all 404 errors to your home page. We will cover two methods and also show you how to create custom redirects for individual pages:
Method 1: Redirect All 404 Errors to the Home Page in WordPress
For this method, we will be using All in One SEO for WordPress (AIOSEO). It is the best WordPress SEO plugin that allows you to set up redirects, optimize your content for search engines, and more.
The first thing you need to do is install and activate All in One SEO (AIOSEO). For more details, see our step-by-step guide on how to install a WordPress plugin.
Note: There is a free version of All in One SEO, but we will be using the Pro version since Redirect is a Pro addon.
Once the plugin is activated, you need to go to All in One SEO » Redirects.
If you haven’t set up redirects yet, then you must click the ‘Activate Redirects’ button.
This will install All in One SEO’s Redirects module.
Next, you will need to click on the ‘Settings’ tab at the top of the page. This page allows you to configure redirects in AIOSEO.
You need to scroll down the page until you find the ‘Advanced 404 Settings’ section. Enable this section by simply clicking the toggle button so that it turns blue.
Now you will be able to see some more settings. You should toggle the ‘Enable default 404 redirect’ button to the on position. After that, make sure that the ‘Home Page’ option is selected.
Notice that there’s also a ‘Custom URL’ option. This allows you to redirect 404 errors to any post or page. Don’t forget to click the ‘Save Changes’ button at the top or bottom of the page to store your settings.
Now when your visitors try to visit a URL on your website that doesn’t exist, they will be taken to the home page instead of seeing the default 404 page.
Method 2: Redirect All 404 Errors to the Home Page Using Code
If you prefer not to use a plugin, then you can use a simple code snippet to redirect all 404 pages to the homepage.
First, you will need to create a new file in your WordPress theme folder and name it 404.php. If your theme already has a 404.php file, then you must edit that file instead.
To edit this file, you need to connect to your WordPress hosting account with an FTP client or their file manager tool.
Once you are connected to your website, you will be able to see the 404.php file in your WordPress themes folder.
You need to add the following code as the first line in your 404.php file:
<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ".get_bloginfo('url'));
exit();
?>
Next, save the 404.php file and reupload it to your theme directory using FTP or your hosting control panel.
Now, when a page is not found, instead of seeing a 404 page, visitors will be redirected to your WordPress home page.
Bonus: Set Up Custom 404 Page Redirects With AIOSEO
The best and most SEO-friendly way of handling 404 errors is to redirect visitors to the most relevant page, not just your homepage.
The All in One SEO plugin’s Redirects feature can also track all 404-page errors and let you set up smart 404-page redirects in WordPress.
If you installed and activated AIOSEO when you followed Method 1, then all you need to do is navigate back to the All in One SEO » Redirects page and click on the ‘Settings’ tab.
Next, scroll down until you see the ‘Logs’ section. Your 404 logs are a record of URLs that your visitors have tried to use to visit pages that no longer exist on your site.
Make sure the ‘404 Logs’ is toggled on so that it looks blue. You can also choose how long you want the plugin to record your logs by selecting the time period from the dropdown menu.
Don’t forget to click ‘Save Changes’ before moving on.
After that, you can click the ‘404 Logs’ menu option to see the last accessed 404 page.
Remember, since you just enabled logging, it may not display anything right away. You might need to wait up to 24 hours before you see any useful insights there.
The ‘URL’ column will show you the pages users tried to visit but don’t exist.
You can redirect any of these URLs to an existing page by clicking the ‘Add Redirect’ link in the ‘Redirect’ column. This will open a dropdown where you can enter your redirect information.
For best results, you need to enter the most relevant page for the original query in the ‘Target URL’ box and then click ‘Add Redirect’.
For example, if you deleted a tutorial on how to start a WordPress blog and then wrote a new one, then it’s best to redirect that old URL to the new blog post rather than your homepage.
To add multiple 404-page redirects, simply follow the same steps as above.
Remember, generally, you don’t want to redirect your 404 page to your home page forever. It’s a great temporary solution until you create a custom 404 page design that will convert better or set up individual redirects that take users to a relevant page that does exist.
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.
Are you looking for the best way to host and manage a virtual event?
Maybe you’d like to hold your next conference online or run a webinar about your products and services. You may be worried that it will be too expensive, or you won’t have the technical knowledge to pull it off.
In this article, we’ll list all of the equipment on online services you’ll need, and teach you everything you need to host a virtual event in WordPress. Plus, if your business doesn’t have a website, then we will cover that too.
Why Host Virtual Events?
Are you looking to host a conference to build your authority in your niche, or invite users to a webinar where you can demonstrate your products and services? You can use your WordPress website as a launchpad for virtual events.
A virtual event is an online gathering where people connect using computers and mobile devices instead of meeting in the same physical location. These events can range from small gatherings to full-scale conferences with thousands of attendees.
They are a good way to generate leads, boost user engagement, and even make money through sponsorship opportunities, selling premium tickets, and offering paid membership.
There are many benefits to running these events online. You won’t need to worry about paying for a venue, and your users won’t have to worry about transport. You also won’t be so affected by time zone differences.
These benefits mean that you’ll likely have a larger attendance at the event. However, virtual events are also more prone to technical problems and difficulties. Organizing an event will always require effort, planning, and the right resources, even when you hold it online.
Are you ready to learn how to host a virtual event using your WordPress website? We’ll walk you through each step.
Here’s a quick outline that you can use to easily browse the article:
If you already have a WordPress website set up, then you can click skip this section. If you like, you can simply use your business website. For big events, you might like to create a landing page on a separate website.
Once your website is set up, the next step is to choose and install an event plugin.
Choosing and Installing a WordPress Event Plugin
You can add the features you need to host an event to your WordPress site by installing a WordPress event plugin. The plugin you choose will depend on your needs, such as whether your users need to purchase a ticket or simply register or RSVP to attend the event.
You should start by deciding whether you want to display an RSVP form, event calendar, or event registration page on your website.
Create an RSVP Form in WordPress
If you simply want your users to RSVP to your event, you can use the free plugin WPForms Lite to create a simple RSVP form on your website.
This will let you keep track of who will be attending and give you an idea of the number of participants you will have.
An event calendar is an easy way to let your users know about the events you are running. Depending on the plugin you choose, you will be able to display your events, let users RSVP to events, sell tickets, add and manage venues, and much more.
For example, The Events Calendar is a feature-rich event management system that makes it easy to add all your event details, including a separate page for venues and organizers.
You have multiple different views for displaying your event calendar on the front end, including day, week, or month. You can even spotlight events to increase engagement on the events you want the most attention on.
Plus, you can add filtering, so your users can find the exact events they’re looking for, and they offer several addons for selling tickets.
Create an Event Registration Page in WordPress
If you decide to sell tickets to your event, you will quickly discover that many third-party event registration and ticketing services will charge a small fee for each ticket you sell.
You can avoid some of these issues by creating your own event registration page in WordPress. This will allow you to collect online payments directly, store attendee information on your website, and use your own brand name when promoting the event.
You can easily create an event registration page using WPForms.
The free Lite version supports Stripe credit card payments, and you can unlock additional payment methods such as PayPal, Square, and Authorize.net by upgrading to the Pro plan.
Now that you have a way that users can let you know they will attend your event, you should create a landing page. This is a carefully designed page that lets your visitors know about your event and encourages them to sign up.
It should contain a clear call to action that is linked to the RSVP form, event calendar, or event registration page that you created.
In our guide on how to create a landing page with WordPress, we show you how to use the top three solutions for creating landing pages in WordPress. These landing page builders are easy to use, optimized for speed, and affordable for small businesses. You can pick the solution that best fits your needs.
Once you have a landing page for your event, you can start to promote it. You can start by linking to your event landing page in your email newsletter and social media.
Getting the Right Audio and Video Equipment
Unless you’re getting started on a really tight budget, you and the speakers at the event shouldn’t use the built-in webcam and microphone on your computer. Your users will instantly notice the low audio and video quality and may decide not to attend future events.
Your most important choice of equipment will be your microphone. We recommend you choose a USB mic so you can plug it straight into your computer without the need for extra gear. Here are three popular microphone choices:
The Samson C01U is a good entry-level USB microphone.
The Rode NT-USB is a high-quality USB microphone that comes with a desktop mount and pop filter.
The Heil PR-40 is what the pros use. It has the standard XLR connection instead of USB, so you’ll need to buy a 3.5mm to XLR Cable, audio interface, or mixer as well.
Your microphone will sound best if you purchase a few more items, such as a microphone arm, shock mount, and pop filter. For example, if you are using the Rode NT-USB microphone, you will need the Rode SM6 shock mount with a built-in pop filter and Rode PSA1 boom arm.
The Rode Podcaster kit is good value and comes with a mic arm and shock mount, and we use this at WPBeginner.
If you don’t want to buy all of your equipment at once, then you could use your built-in webcam while you get started, but you will likely get better video quality out of your smartphone’s camera.
You will need to mount your phone on a tripod, and the GripTight GorillaPod Stand PRO is a good option for any type of phone. It has adjustable legs that can be attached to any surface.
Eventually, you can upgrade to a 4K webcam like the Logitech BRIO Webcam. This camera is perfect for video conferencing and easily clips onto any computer. It has excellent video quality even in low light.
You’ll also need decent headphones so that the audio from your speakers isn’t picked up by your microphone. Headphones that plug in are more reliable than Bluetooth headphones. A good option is the Sony MDR7506.
Choosing and Integrating a Video Conferencing Service
You will need to choose an online service that allows you to run virtual events. You can check our list of the best webinar software platforms and compare their features so you can choose the best webinar platform to fit your needs and budget.
We believe that GoToWebinar, LiveStorm, and EasyWebinar are good options because they offer all the powerful webinar features that you need with high-quality video streaming and affordable pricing plans.
If you’re just starting out, then we recommend Zoom because it is easy to use, well-known, and mobile-friendly. Zoom lets you schedule meetings in advance and provides a unique link for each event that you can share with the participants and include on your website.
It is also easy to integrate Zoom with WordPress but to do that you need at least the Pro version of Zoom and the Zoom webinar addon. There is a free version, but you’ll need to have a paid account in order to set up the integration.
You will need to set up Zoom correctly and then connect your account with your WordPress website. Once you’ve done that, you can set up a workflow using Uncanny Automator to automatically register your users with Zoom once they sign up or purchase a ticket.
Before you know it, the time will arrive to run your event. If you’ve chosen the right webinar software platform, you will have all of the features you need, along with reliable, high-quality video and audio.
You will be able to feature multiple presenters and hosts and share your screen with the participants for demonstrations.
We recommend that you mute everyone by default. However, using your platform’s built-in chat feature, participants will be able to interact with you and one another during the event.
They will also be able to ask and answer questions, and you can have them fill in polls to provide you with feedback. We recommend UserFeedback by MonsterInsights for this sort of interaction.
Event Follow Up
After the event is finished, you should follow up with your participants as soon as possible, while they are most interested and the event is still fresh in their minds.
Because you have their contact details from when they registered, you can send them a follow-up email. In that email, you can ask for their feedback. You might like to follow our guide on how to create a survey form in WordPress.
You can follow up with further emails to let them know about the events you have coming up and to gauge their interest in different topics by creating an interactive poll.
Most webinar services will allow you to record the event, and some can even create transcripts. This will allow users who couldn’t attend the live event to see the content.
Finally, most webinar services include actionable analytics so you can see what’s working and what’s not. They will show you who attended, gauge the audience’s interest, list the questions that were asked, and more. This will allow you to fine-tune your event in the future for maximum conversions.
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.