Do you want to display your Twitter followers count as text in WordPress?
By showing that many people follow you on social media, you can encourage visitors to trust your website. Even better, by displaying this information as text, you have the freedom to use it anywhere on your website, including inside your posts and pages.
In this article, we will show how to display your Twitter followers count as text in WordPress.
Why Display Twitter Followers Count as Text in WordPress?
You may have noticed that many popular blogs, influencers, and brands proudly show how many people follow them on social media.
If visitors see lots of people following you on social media, then they are more likely to trust your business and see you as an expert in your blogging niche.
Many of the best social media plugins allow you to show the total follower count in embedded feeds, buttons, banners, and more.
However, sometimes you may want to show the number as plain text. This gives you the freedom to add the follower count to your blog posts, footer, or anywhere else on your WordPress blog or website.
With that in mind, let’s see how you can display your Twitter follower count as text in WordPress.
Step 1: Get a Twitter API Key and Secret
To get your follower count, you will need to access the Twitter API by creating an API Key and Secret.
To get this information, head over to the Twitter Developers Portal and then click on ‘Sign up for Free Account.’
You can now type in some information about how you plan to use the Twitter API. It’s a good idea to provide as much detail as possible, as Twitter will review this information and may delete your account if they don’t understand how you are using their API.
After that, read the terms and conditions. If you are happy to continue, go ahead and click on the ‘Submit’ button.
You will now see the Developer Portal. In the left-hand menu, click to expand the ‘Projects & Apps’ section. Then, select ‘Overview.’
You can now go ahead and click on ‘Add App.’
After that, just type in the name you want to use for your Twitter app. This is just for your reference, so you can use anything you want.
With that done, click on the ‘Next’ button.
Twitter will now show an API key and API Secret. This is the only time you will see this information, so make a note of it somewhere safe.
We recommend adding the key and secret to a password manager for extra security.
Step 2: Add Custom Code to Your WordPress Website
The easiest way to add the Twitter follower count to your site is by using PHP code.
For security reasons, WordPress doesn’t allow you to add PHP code directly to your pages and posts, but it does allow shortcodes. This means you can create a custom shortcode and then link it to your PHP code.
The easiest way to add custom shortcodes in WordPress is by using WPCode. This plugin allows you to create as many shortcodes as you want and then link them to different sections of PHP code.
Upon activation, head over to Code Snippets »Add Snippet.
Here, you will see all the ready-made snippets you can add to your website. These include snippets that allow you to completely disable WordPress comments, upload files that WordPress doesn’t support by default, and more.
Since you are creating a new snippet, hover your mouse over ‘Add Your Custom Code.’ Then, just click on ‘Use snippet.’
To start, type in a title for the custom code snippet. This can be anything that helps you identify the snippet in the WordPress dashboard.
After that, you need to open the ‘Code Type’ dropdown and select ‘PHP Snippet.’
In the code editor, simply paste the following PHP code:
function getTwitterFollowers($screenName = 'wpbeginner')
{
// some variables
$consumerKey = 'YOUR_CONSUMER_KEY';
$consumerSecret = 'YOUR_CONSUMER_SECRET';
$token = get_option('cfTwitterToken');
// get follower count from cache
$numberOfFollowers = get_transient('cfTwitterFollowers');
// cache version does not exist or expired
if (false === $numberOfFollowers) {
// getting new auth bearer only if we don't have one
if(!$token) {
// preparing credentials
$credentials = $consumerKey . ':' . $consumerSecret;
$toSend = base64_encode($credentials);
// http post arguments
$args = array(
'method' => 'POST',
'httpversion' => '1.1',
'blocking' => true,
'headers' => array(
'Authorization' => 'Basic ' . $toSend,
'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8'
),
'body' => array( 'grant_type' => 'client_credentials' )
);
add_filter('https_ssl_verify', '__return_false');
$response = wp_remote_post('https://api.twitter.com/oauth2/token', $args);
$keys = json_decode(wp_remote_retrieve_body($response));
if($keys) {
// saving token to wp_options table
update_option('cfTwitterToken', $keys->access_token);
$token = $keys->access_token;
}
}
// we have bearer token wether we obtained it from API or from options
$args = array(
'httpversion' => '1.1',
'blocking' => true,
'headers' => array(
'Authorization' => "Bearer $token"
)
);
add_filter('https_ssl_verify', '__return_false');
$api_url = "https://api.twitter.com/1.1/users/show.json?screen_name=$screenName";
$response = wp_remote_get($api_url, $args);
if (!is_wp_error($response)) {
$followers = json_decode(wp_remote_retrieve_body($response));
$numberOfFollowers = $followers->followers_count;
} else {
// get old value and break
$numberOfFollowers = get_option('cfNumberOfFollowers');
// uncomment below to debug
//die($response->get_error_message());
}
// cache for an hour
set_transient('cfTwitterFollowers', $numberOfFollowers, 1*60*60);
update_option('cfNumberOfFollowers', $numberOfFollowers);
}
return $numberOfFollowers;
}
echo getTwitterFollowers(); ?>
In the code above, make sure you replace the following placeholders with your own API key and API secret:
You will also need to replace ‘wpbeginner’ with the Twitter account that you want to use. This can be any Twitter account, including accounts that you don’t own:
function getTwitterFollowers($screenName = 'wpbeginner')
To get the Twitter username, simply open the Twitter profile in a new tab. You will find the username in the URL and in the profile header:
With that done, switch back to the WordPress dashboard. Here, simply click on the ‘Inactive’ toggle so that it changes to ‘Active.’
You can then go ahead and click on the ‘Save snippet’ button.
With that done, scroll to the ‘Insertion’ section.
WPCode can automatically add your code to different locations, such as after every post, front end only, or admin only. To get the shortcode, simply click on the ‘Shortcode’ button.
You can now use the shortcode to add social proof to any page or post.
In the block editor, simply click on the ‘+’ button and type in ‘Shortcode.’ When it appears, select the Shortcode block to add it to the page or post.
You can now add the shortcode to the block.
Just be aware that the shortcode simply shows the total follower count, so you will typically want to add some text explaining what the number means.
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 SeedProd website kits and templates?
SeedProd is a website and theme builder that comes with dozens of ready-made templates for almost every business niche.
These templates are designed to save you time. This means you don’t need to manually build a site. Instead, you can import a ready-made SeedProd site kit to set up your WordPress website quickly.
In this article, we will share some of the best SeedProd site kits and templates to set up your website in one click.
How to Make a WordPress Website With a SeedProd Template Kit
SeedProd is the best WordPress website and theme builder. Over 1 million WordPress users trust SeedProd to build and customize their sites.
If you want to make a website, eCommerce store, or personal blog, then SeedProd is a one-stop solution with over 50 theme template kits, and they add new templates every week.
Whether you own a dry cleaning business or run a travel blog, you will find a built-in template kit for your niche. You can import one of these site kits in one click, and your website is ready.
Each SeedProd website template includes a homepage, landing pages, and a contact page. It also comes with dummy content and images, so you can see the final look of your website even before it’s ready.
Then, all you need to do is replace the dummy content with your text and images. You can use the SeedProd drag-and-drop builder to customize the template.
Note: The links in this article go to theme previews. To add a site kit to your website, you will need to navigate to SeedProd » Theme Builder and click the ‘Theme Template Kits’ button. You can find detailed instructions in our guide on how to install template kits.
Without any delay, let’s look at our hand-picked and best SeedProd site kits and templates.
The Real Estate theme template kit for SeedProd will let you create a customizable real estate website in seconds. Just click on the template to import it, and you are ready to customize the content, styling, and branding in SeedProd’s visual editor.
Each property page contains photos as well as dimensions and other selling points. All of your listings are showcased together on the Projects landing page for easy browsing. There are also separate listings for houses and apartments.
The About page describes who you are, along with statistics for projects completed, underway, and more. You can easily add photos of your team to a grid.
The Contact page lists all of your locations, email addresses, and phone numbers and displays them on a convenient zoomable map.
The Music House theme is the best SeedProd site kit for music teachers and educational institutions. With some tweaking, it’s also suitable for bands, musicians, and other people in the music industry.
Besides offering an About Us and Campus (contact) page, you will find a page where you can list your classes, including fees and available days. There is also a page where you can add photos and details about all of your music teachers.
The Conduct Construction theme kit is suitable for anyone in the building industry who wants to list their services and show off their past projects.
The Services page offers a photo grid where you can display photos and descriptions of the types of building jobs you are able to handle. Underneath, this is a full-width section where you can add a wide photo and provide a written list of your projects.
The Projects page displays a photo gallery of your previous work. There are tabs along the top so your website visitors can filter by project type, such as ‘Manufacturing Industry’, ‘High-rise’, and ‘Public Infrastructure’.
The About Us page lets you describe your corporate philosophy, display a chart of your accomplishments, and show statistics about your engineering workforce. All of these sections are easy to customize using SeedProd’s drag-and-drop interface.
The Venture Marketing Firm theme template has a home page where agencies can show off what makes them unique, along with the types of marketing they provide. Full details of the services offered can be provided on the Services page.
A beautiful Portfolio page provides a photo gallery that can be filtered by project type. At the bottom of the page, your visitors can add their email addresses to request a proposal.
The Contact Us page features a map of your location, social links, and a newsletter sign-up form.
The Wedding Invitation website kit lets couples share the details of their wedding with friends and family. This makes online invitations easy and is a helpful reminder for the date, time, and address of the ceremony and reception.
On the custom home page, there is room for you to tell the story of how you met, fell in love, and proposed. You can even create a photo timeline of your relationship on the Our Story page and add an album of your special memories on the Photos page.
The Join Us page serves two purposes. First, it provides a form where your guests can RSVP. Second, it displays a map of the venue where guests can easily find directions.
The Travel Blog theme template kit allows bloggers to share stories, photos, and videos of their latest travel adventures and gear.
The front page offers a ‘Start Today’ button that takes readers to the Work With Me page, where they can subscribe to blog updates and your social channels. It also includes sections that display your latest videos and highlights places to visit.
The Destinations page displays your travel articles by geographic region in an attractive grid, and the Videos page allows you to embed your YouTube videos.
The Dry Cleaning website theme is the best SeedProd template kit for local businesses like laundromats. The front page provides a handy summary of your services and the benefits your business offers. These can also be found on the Services page.
The SeedProd visual editor offers a Pricing Table block, and one has been added to the Prices page. You can easily customize this price list with your own prices and categories using SeedProd’s visual editor.
At the bottom of the About page, SeedProd’s Testimonials and Star Rating blocks have been added. These let you easily add customer reviews and ratings for your business to increase social proof.
The Contact page lists the addresses, emails, and phone numbers of each location of your business, along with a map that will help customers navigate to your stores.
The custom home page lets you introduce the courses you offer, display testimonials from your students, and more.
You can describe your courses in greater detail on the Lessons page. A ‘Start Learning’ button allows students to subscribe to the courses they are interested in.
The About page gives more details about your online business, and the Contact page allows potential students to reach out and ask for more information.
The NM Advertising Agency theme allows you to quickly create a website for advertising agencies and public relations specialists. You simply need to customize the site with information about your own business.
The front page displays helpful statistics and pie charts that demonstrate how you can help and the return on investment your clients can expect.
The Services page lets you spell out the variety of marketing and public relations services you offer, and you can share a portfolio of your prior projects on the Work page.
You can highlight the expertise of your staff on the Team page, and the Contact page allows potential clients to schedule an in-person visit or speak to a team member about their needs.
The eBook Author theme template kit is a great way to promote and sell your eBooks in WordPress. An attractive Bio page is included, which you can customize with your own story and Instagram photos.
Your books are listed in a grid on the Books page. This page also lets you highlight upcoming books and provides a form where your readers can subscribe for regular updates.
The Personal Trainer theme kit features a clean and attractive home page that will introduce your in-person or online training services to potential clients.
You can add an explainer video to the Training page where you introduce yourself and demonstrate your training methods. You can also customize the Packages and Rates section and add your own frequently asked questions using SeedProd’s Accordion block.
You can add your best client reviews on the Testimonials page and tell the story of your own personal fitness transformation on the Result page.
There is a button on the home page where clients can schedule an appointment. This can take your clients to the WordPress appointment or booking plugin of your choice.
The Child-Day Care Website theme kit makes it easy to create an attractive website for a childcare or daycare center.
The theme will automatically create an attractive Curriculum page that you can customize with your own approach to early childhood education.
The About Us page can describe the values and benefits of your center. It also includes a ‘Meet Our Leadership’ section where you can add photos of your team.
The Blog entry in the navigation menu lets you keep your audience up to date with the current events in your daycare center and share educational tips on raising young children.
Finally, you can customize the ‘Book a Tour’ button to allow parents to send you an email or take them to your online booking form in WordPress.
The Juice Bar website theme kit for WooCommerce lets you quickly set up a beautifully-designed online store. By default, this store template features bottled juice and other beverages, but it can be easily customized for other products.
The home page is set up to highlight product collections, items on sale, and other featured products. SeedProd offers helpful blocks to automatically display Recent Products, Sale Products, Best Selling Products, Featured Products, and Top Rated Products.
The Shop item in the navigation menu takes customers to all of your products, and clicking on a product displays the product page. The ‘Add to Cart’ buttons are live and add products to the WooCommerce shopping cart.
The Computer Technician theme is the best SeedProd template kit for anyone who offers IT-related services. The front page contains sections that can be customized to describe your business, display testimonials, and demonstrate how you save your clients time and money.
The Services page can display any number of services that you may offer, like data recovery, Apple product service and repair, and laptop repair. These can be easily edited to suit your own business.
Like most themes, there are also About and Contact pages. The Contact page has a contact form where your clients can get in touch with you.
Frequently Asked Questions About Site Kits and Templates
Here are some questions we are often asked about SeedProd site kits and template kits.
What is a template kit?
WordPress template kits are collections of pre-designed templates, layouts, and other elements that allow you to create a professional-looking website without writing code.
They are a powerful feature of some drag-and-drop page builder plugins and may be called website kits, website templates, or WordPress starter templates. In SeedProd, they are called theme template kits.
What is the difference between a WordPress theme and a template kit?
WordPress allows you to customize the appearance of your website by installing themes. Themes determine the overall look of all the pages on your site. There are thousands of WordPress themes available (both free and paid).
A template kit is a feature of a drag-and-drop page builder plugin, such as SeedProd. It comes with designs for common pages such as an About page, a Contact page, and a custom home page. It may also provide templates for areas that appear across multiple pages, such as a header and footer template.
The benefit of template kits is that they are easier to customize using the drag-and-drop page builder. They also have more customization options than standard WordPress themes.
What is the best SeedProd site template kit?
There isn’t one SeedProd site template kit that is best for every website. Instead, you should choose a site kit designed for your industry or niche. Luckily, SeedProd has many different site kits for all kinds of websites and businesses.
You should take into consideration the appearance of the kit as well as the extra custom pages it creates for you.
Before making the kit live, you will need to replace the demo content. You may also want to change the kit’s branding to better match your own business. It’s easy to customize every part of the design using the drag-and-drop editor.
If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.
Do you want to add a dynamic copyright date in your WordPress website’s footer?
A website with an outdated copyright date can look unprofessional. Adding a dynamic copyright date to your site’s footer shows visitors that your website is up-to-date and regularly maintained.
In this article, we will show you how to easily add a dynamic copyright date in the WordPress footer.
Why Add a Dynamic Copyright Date in WordPress Footer?
A copyright date typically covers the current year or range of years in which the content, design, and code of your WordPress website are protected by copyright laws.
The copyright date on your website should be current, but manually updating it takes time, and you might forget to do it.
That’s where a dynamic copyright date can help. It will automatically update to ensure that the date is accurate and meets the copyright laws of different countries.
It also helps protect your content from copyright infringement and plagiarism.
Plus, an updated copyright date also signals to search engines that your website is well-maintained and active. This can help improve your website’s search engine rankings and attract more traffic to your site.
In this article, we will show you how to easily add a dynamic copyright date in the WordPress footer. You can use the quick links below to jump to the method you want to use:
Method 1: Add Dynamic Copyright Date Using WPCode (Recommended)
If you want to generate a dynamic copyright date that covers all the years from the start of your WordPress blog until the current year, then this method is for you. It works by using the published date of your oldest post and your newest post.
To add a dynamic copyright date to your WordPress footer, many tutorials will tell you to add custom code to your theme’s functions.php file. However, the smallest error while typing the code can break your website.
That’s why we recommend using WPCode, which is the best WordPress code snippets plugin on the market. It is the easiest and safest way to add code to your website.
First, you will need to install and activate the WPCode plugin. For more instructions, you may want to see our tutorial on how to install a WordPress plugin.
Note: You can also use the free WPCode plugin for this tutorial. However, upgrading to the Pro version will give you access to a cloud library of code snippets, smart conditional logic, and more.
Upon activation, just visit the Code Snippets » + Add Snippet page from the WordPress admin sidebar.
From here, go to the ‘Add Your Custom Code (New Snippet)’ option and click on the ‘Use Snippet’ button under it.
This will direct you to the ‘Create Custom Snippet’ page, where you can start by typing a name for your code snippet.
Keep in mind that this name won’t be displayed on the front end and is only used for identification purposes.
After that, you need to choose ‘PHP Snippet’ as the Code Type from the dropdown menu in the right corner.
Once you have done that, simply copy and paste the following code into the ‘Code Preview’ box:
Upon activation, the plugin will automatically fetch data for your copyright date. Keep in mind that the plugin only displays the current year and does not show the range of years that the site has been used.
To display the copyright date, you will now have to add a shortcode to the website footer.
Add Dynamic Copyright Date in a Classic Theme
If you are using a classic theme that doesn’t use the full site editor, then this method is for you.
First, you need to visit the Appearance » Widgets page from the WordPress admin sidebar. Once you are there, scroll down to the ‘Footer’ tab and expand it.
For this tutorial, we are using the Hestia Pro theme, so your widgets may look a bit different depending on the theme that you are using.
Next, click on the ‘+’ button in the top left corner of the screen and find the Shortcode block.
Simply add the block to the ‘Footer’ tab and then copy and paste the following shortcode into it to display the copyright date:
[cr_year]
If you also want to add a copyright symbol along with the date, then you should add the following shortcode as well.
[cr_symbol]
Finally, click the ‘Update’ button at the top to save your changes.
Now, you can visit your website to check out the dynamic copyright date in action.
Add Dynamic Copyright Date in a Block-Based Theme
If you are using a block-based theme with the full site editor, then you can insert the dynamic copyright shortcode with this method.
You need to head to the Appearance » Editor page from the WordPress admin sidebar.
Once you are there, choose the ‘Footer’ section and then click on the ‘+’ button in the top left corner of the screen. Then, look for and add the Shortcode block.
After that, add the following shortcode into the block to display the copyright date on your website:
[cr_year]
If you want to add a copyright symbol along with the dates, then simply copy and paste the following shortcode into the block as well:
[cr_symbol]
Finally, click the ‘Save’ button at the top to store your settings.
Now, you can visit your website to see the dynamic copyright date in action.
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.
Have you ever wished you could give business cards to people you meet online?
Wouldn’t it be nice if there was an easy way to let people know how to connect with you WITHOUT spending a dime for an expensive marketing tool?
If you’re like me and most other smart business owners, then you have at least wished for this solution a couple of times in your business journey.
Today, I am excited to release a new FREE tool, WPBeginner’s Email Signature Generator, which helps you let people know who you’re and how to reach out to you.
We built this tool because we want to make it easy and FREE for everyone to create a stunning email signature.
What is WPBeginner’s Email Signature Generator?
Our Email Signature Generator is a powerful FREE online tool that enables you to design aesthetically pleasing email signatures in a few minutes.
No need to hire a designer or use an expensive tool. If you can point and click with a mouse, you can design beautiful email signatures quickly and easily.
The best part is that our email signature builder generates an HTML signature, which is supported by every email client available in the market, including Gmail, Outlook, Yahoo Mail, Apple Mail, and more.
As opposed to image-only signatures, HTML signatures reduce the likelihood of your emails being flagged as spam by spam filters.
While a well-designed email signature can help make a good first impression, most people don’t use a signature at all because it’s not easy to design one.
This is why we decided to build the Email Signature tool at WPBeginner and make it free for all our readers.
Below are a few benefits of using an email signature for your emails.
Your digital business card: Email signatures have the same purpose as a business card. It shows you who you are and the brand you represent.
Real person: It reassures your email recipients that they’re communicating with a human being rather than a bot.
Brand awareness: It helps in brand awareness and enables you to show your contact details, website URL, social media profiles, and more.
How to Use WPBeginner’s Email Signature Generator
Now you’ll be directed to our email signature builder, where you can add signature details like name, email address, phone number, website URL, and more. The builder even lets you change the signature template as you customize your signature details.
The signature builder comes with 4 options to tweak your signatures the way you want.
General: Add more info like your name, email address, company name, your position at the company, and the department you work at.
Theme: This is where you pick a different template design if you change your mind.
Addons: Add even more details, like social media profiles, and change the avatar and a logo URL.
Styling: Make advanced changes like fonts and spacing, and make your signature unique.
Next, you’ll be prompted to sign up for the WPBeginner newsletter. And finally, you can copy the HTML signature embed code and paste it into your preferred email client.
Our Signature Generator Improves Deliverability
To improve email deliverability, our Email Signature Generator helps you build HTML email signatures.
Unlike image-only signatures, HTML signatures are not likely to be flagged by spam filters.
That’s because spam filters take text:image ratio into account to figure out whether an email is legitimate or spam.
Using only an image as your signature could potentially reduce the text:image ratio and increases the likelihood of your emails getting flagged by spam filters.
Customize Email Signature the Way You Want
Another benefit of creating HTML signatures is that it’s highly customizable. With our free tool, you can easily add as many or as few details as you want to your email signature.
For example, you can add important details like your first and last name, your business name, job title, and department.
If you want, you can add even more details such as:
Your recent photograph
Your company logo
Social media profile links
And so much more…
Set Up a Professional Email Address for FREE!
Alongside a stunning email signature, we highly recommend using a professional email address. A professional email address uses your company name instead of the generic name, like Gmail, Outlook, or Yahoo.
Here’s what a professional email address looks like: john@examplebusiness.com. And here’s an example of a generic email address: john.smith2019@gmail.com.
When a professional email address is used alongside a professional email signature, you can win trust when dealing with other businesses and customers.
On the other hand, since anyone can create generic email accounts, it becomes harder for customers and other businesses to trust generic email addresses as legitimate business email accounts.
Setting up a professional email address is free if you already have a website. If you don’t have a WordPress website yet, you can build one with Bluehost, which offers a free domain name, free business email address, and 60% OFF web hosting.
If you have ideas on how we can make WPBeginner’s Email Signature Generator or other tools more helpful for you, then share your thoughts in the comments.
As always, I want to thank you for your continued support of WPBeginner, and we look forward to continue serving you for years to come.
Do you want to use shortcodes in your WordPress theme?
Normally, you will use shortcodes inside content areas like posts, pages, or sidebar widgets. However, sometimes you may want to add a shortcode inside your WordPress theme.
In this article, we will show you how to easily add any shortcode to your WordPress theme.
Why Use Shortcodes in Your WordPress Themes?
Shortcodes allow you to add all kinds of features to your website, including image galleries, forms, social media feeds, and much more.
WordPress comes with a few built-in shortcodes, but there are also many popular WordPress plugins that add shortcodes to your site.
For example, WPForms has easy-to-use blocks, but it also provides shortcodes so that you can add forms to other areas of your website.
Most of the time, you will add shortcodes inside content areas like posts and pages.
However, sometimes you may want to use a shortcode inside your WordPress theme files.
This allows you to add dynamic elements to areas you can’t edit using the standard WordPress post editor, such as your 404 page. It’s also an easy way to use the same shortcode on multiple pages.
For example, you might add a shortcode to your theme’s Page or Post template.
With that in mind, let’s see how you can use shortcodes in your WordPress theme. Simply use the quick links below to jump straight to the method you want to use.
Method 1: Using the Full-Site Editor (Block Themes Only)
The easiest way to use shortcodes in your WordPress theme is by using the full site editor. This allows you to add a Shortcode block to any part of your website.
However, this method only works with block-based themes like Hestia Pro. If you are not using a block-enabled theme, then you will need to use a different method instead.
To get started, head over to Themes » Editor in the WordPress dashboard.
By default, the full site editor shows your theme’s home template, but you can add shortcodes to any template or template part, such as the header or footer.
To see all the available options, just select either ‘Templates’ or ‘Template Parts’.
You can now click on the template or template part you want to edit.
As an example, we will add a shortcode to the 404 page template, but the steps will be exactly the same no matter which template you select.
WordPress will now show a preview of the template or template part.
To add a shortcode, go ahead and click on the small pencil icon.
With that done, click on the blue ‘+’ icon in the top left corner.
In the search bar, you need to type in ‘Shortcode’.
When the right block appears, drag and drop it onto the theme template.
You can now either paste or type the shortcode that you want to use.
After that, go ahead and click on the ‘Save’ button.
Now, simply visit your WordPress blog to see the shortcode in action.
Method 2: Editing Your WordPress Theme Files (Works With Any WordPress Theme)
You can also add shortcodes to your WordPress theme by editing the theme files. This method is more advanced, but it works with every WordPress theme.
If you are creating a custom theme, then you can add or modify the code in your existing theme files.
When editing your theme files, you can’t add the shortcode in the same format you use with standard content areas. Instead of seeing the shortcode’s output, you will see the shortcode itself on the screen.
This happens because WordPress doesn’t execute shortcodes inside theme template files. Instead, you will need to explicitly tell WordPress to run the shortcode using the do_shortcode function.
If you are adding a shortcode with extra parameters, then the code snippet will also change a little bit.
Imagine you have created a contact form using WPForms. In this case, you will need to use the standard WPForms shortcode plus the form’s ID:
echo do_shortcode("[wpforms id='92']");
Troubleshooting: What to Do When do_shortcode Isn’t Working
Sometimes, you may add a shortcode to a theme file, but the code’s output doesn’t appear on your WordPress website. This usually means the shortcode depends on a WordPress plugin or some other code on your website.
If the do_shortcode function is not working, then make sure the plugin providing the shortcode is installed and activated by going to Plugins » Installed Plugins.
In the following image, WPForms is installed but deactivated, so the echo do_shortcode code won’t work.
You can also check whether a shortcode is available for you to use by adding the shortcode_exists() function to your index.php file.
In the following snippet, we are checking whether the WPForms snippet is available to use on our website:
if ( shortcode_exists( 'wpforms' )) {
echo do_shortcode("[[wpforms id='147']]");
}
If you still don’t see the shortcode output on your website, then try clearing the WordPress cache, as you may be seeing an outdated version of your site.
Method 3: Creating Your Own WordPress Theme (Fully Customizable)
Another option is to create a custom WordPress theme. This is a more advanced method, but it allows you to add as many shortcodes as you want to any area of your WordPress theme. You can also make other changes to create a theme that has exactly the features and design you want.
In the past, you would need to follow complicated WordPress tutorials and write code to build a custom WordPress theme. However, it’s now possible to create a custom theme without writing a single line of code using SeedProd.
SeedProd is the best WordPress page builder and also comes with a theme builder. This allows you to design your own themes using drag and drop.
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 ways to backup your WordPress site?
Creating a backup is a great way to safeguard your website data from security threats and human errors. You can easily restore a saved version of your site in case anything goes wrong.
In this article, we’ll show you how to backup your WordPress site.
Why Backup Your WordPress Website?
As a WordPress website owner, you need to protect your data from unexpected events. Creating a website backup is one of the ways to protect your crucial data.
There are many security threats that can compromise your site and lead to data loss. For example, hackers, malware, and phishing attacks can leave your site’s data vulnerable.
Similarly, human errors, conflicts between WordPress plugins, themes, or server failures can break your site. If you’re unable to troubleshoot the issue, then it can be very difficult to recover your website.
A WordPress backup saves a copy of your site’s important files, folders, and databases. This includes your content, plugins, themes, images, videos, settings, and other information. You can easily use the backup to restore your website in case you get locked out of your website due to an error or cyberattack.
Do note that WordPress doesn’t offer a built-in option to automatically back up your WordPress site on a regular basis. You’d have to manually back up your site using the hosting service’s cPanel or an FTP client.
An easier way is to use a plugin, as you’ll have more control over which content to save. Plus, it is a beginner-friendly method, as accessing the cPanel or FTP client can be overwhelming for new users.
That said, let’s see how you can create a WordPress backup using different methods. You can click the links to jump ahead to your preferred method:
Method 1: Backup a WordPress Site Using a Plugin (Recommended)
The easiest way to create backups is by using a plugin like Duplicator. It is the best WordPress backup plugin that’s used by over 1,500,000 professionals. Duplicator is beginner friendly plugin that makes it very easy to back up, migrate, and clone your website.
For this tutorial, we’ll be using the Duplicator Pro plugin because it includes more features like scheduled backups, recovery points, cloud storage integration, migration tool, and more. There is also a free version of Duplicator you can use to get started.
First, you’ll need to install and activate the Duplicator Pro plugin. If you need help, then please see our guide on how to install a WordPress plugin.
Upon activation, you can go to Duplicator Pro » Settings from your WordPress admin panel and switch to the ‘Licensing’ tab. Go ahead and enter the license key, which you can find in the account area.
Next, you’ll need to head to the Duplicator Pro » Packages page from the WordPress dashboard.
From here, simply click the ‘Create New’ button in the top corner.
On the next screen, you will need to enter a name for your backup.
This will help you find the package when you’d need to restore a website.
Under the Storage section, you can add another storage location for your package. The plugin will use the default location to save your backup files.
For this tutorial, we will use the default location. However, you can click the ‘Add Storage’ link and add a new location like Dropbox or Google Drive.
You can now scroll down to the Archive section to customize your backup. For instance, the plugin lets you only backup the database, filter files, folders and extensions, and more.
If you want a complete backup of your site, then we recommend keeping the default settings and don’t select anything under the Archive section.
Next, you can scroll down to the Installer section. These are optional settings that are filled in at the time of installing the backup.
You can simply click the ‘Next’ button and leave this section as it is.
The plugin will now perform a scan and make sure everything is in order to create a backup of your site.
It will show a ‘Good’ evaluation if everything checks out or show a warning so you can quickly fix the issue before backing up the website.
Next, you can click the ‘Build’ button at the bottom.
Duplicator will now start building a package.
Once it’s done, you can go to Duplicator Pro » Packages from your dashboard to view the backup.
Go ahead and click the ‘Download’ option and then select the ‘Both Files’ option.
This will download the zip file and the installer file onto your computer. You can then use these files as backup and easily restore your site in case of a cyberattack or a critical error.
Create a Recovery Point to Restore Your Website
Another advantage of using Duplicator is that it lets you set up a recovery point for your website. Recovery points help restore your backup if there is a massive website failure. This way, you can easily return to the last functioning version of your website.
To start, you can go to Duplicator Pro » Packages from your WordPress admin panel and click the arrow in the corner to expand the package details.
After that, simply click the ‘Recovery Point’ option.
A new window will now open. Go ahead and click the ‘Set Recovery Point’ option.
Next, you will need to click the recovery arrow icon to copy the recovery URL.
You can save this URL in a secure location and use it to easily restore your site in case of a failure or security vulnerability.
All you have to do is enter the recovery URL in the browser. This will automatically launch the recovery wizard. You can then follow the steps to restore your site from the backup.
With Duplicator Pro, you can also automatically schedule backups for your website. This way, you will always have the latest website backup to work with. Plus, it helps save time as you don’t have to manually create a backup.
To start, you’ll need to go to Duplicator Pro » Schedules from the WordPress dashboard and click the ‘Add New’ button.
After that, you can enter a name for your backup schedule.
The plugin will also let you select a package template, where you get to customize your backup and choose which files to back up. If you want a full backup, then we recommend leaving the package template setting to default.
Next, you can scroll down and select the storage location for your scheduled backups. The plugin will use the default location, but you can add another location, like Dropbox, OneDrive, or Google Drive.
There is also an option to select the frequency of backups. For instance, you can set up automatic backups on an hourly, daily, weekly, or monthly basis. We’ve set the backup repeats to weekly for this tutorial.
After that, you can select a start time for your backup.
You’ll also need to ensure that the ‘Enable This Schedule’ checkbox is selected.
Once that’s done, simply click the ‘Save Schedule’ button.
Duplicator will now automatically back up your WordPress site on the set day and time. This way, you’ll have a fresh backup to restore if anything goes wrong.
Method 2: Manually Backup a WordPress Site Using cPanel
You can also manually back up your WordPress website by using the cPanel of your WordPress hosting service.
For this tutorial, we will be using Bluehost. Do note that the settings may vary depending on the hosting service you’re using.
First, you’ll need to log in to the cPanel of your hosting provider. From here, go the the ‘Advanced’ tab from the menu on your left and then click the File Manager option under the Files section.
In a new tab or window, the file manager will now open.
Next, you need to select the public_html folder from the menu on the left and click the ‘+’ button to expand it.
From here, simply select the folder with your website name and click the ‘Compress’ option at the top.
A new window will now pop up. Go ahead and select the ‘ Zip Archive’ option and click the ‘Compress Files’ button.
Your website files now start to compress into a zip file.
The hosting service will also show a compression result. You can simply click the ‘Close’ button.
Next, you’ll need to select the zip file that you just created. It will be located in the public_html folder.
After selecting the file, simply click the ‘Download’ option at the top.
Next, you can save the compression file in a secure location.
Now whenever your site goes down due to an error or security issues, you can use the compressed file as a backup and easily restore your content.
Method 3: Manually Backup WordPress Databases
Using your WordPress hosting services’ cPanel, you can also back up different WordPress databases. However, this is a time-consuming process because you’ll need to import multiple tables manually.
First, you will need to log in to the cPanel of your hosting service. We will be using Bluehost for this tutorial.
Next, head to the ‘Advanced’ tab from the menu on your left and scroll down to the Databases section. From here, simply click the ‘phpMyAdmin’ option.
Once the phpMyAdmin opens, you can select a database from the menu on your left.
After that, simply select the tables you’d like to backup and click the Export button at the top.
On the next screen, you can keep the ‘Export method’ as Quick. For the ‘Format’, you’d want to select SQL.
Once that’s done, go ahead and click the ‘Go’ button.
You can now save the SQL file on your computer in a secure location as a backup.
To restore a database, you’ll just need to import the SQL file into the phpMyAdmin panel.
Method 4: Manually Backup a WordPress Site Using FTP
If you don’t want to use a backup plugin or access the cPanel, then you can back up a WordPress site using an FTP client.
There are many FTP clients you can use for Mac and Windows. For this tutorial, we will use FileZilla.
First, you’ll need to connect to your site using the FTP software. You can see our guide on what is FTP and how to use it for more details.
Once you’re connected, simply head to the root directory of your website from the panel on your right. This is where you’ll find folders like wp-content, wp-admin, and other important files like wp-config and .htaccess.
Next, you can right-click any folder or file you want to backup
After that, simply click the ‘Download’ option.
You can save the files and folders from a live website to your local host or computer as backups.
Now that you’ve created a WordPress site backup, the next step is to restore it in case you encounter a critical error, or your site is compromised.
First, you’ll need to clean your site and delete all the WordPress files. You can do that by connecting an FTP client and removing all the folders and files. After that, you will need to install WordPress again and log in to your site.
Next, you’re now ready to restore your WordPress backups.
If you’re using the Duplicator Pro plugin, then it is very easy to upload the backup package. Simply head to Duplicator Pro » Import from your WordPress dashboard and drag and drop the package file.
From here, simply follow the steps in the import wizard to recover your website. You can see our step-by-step guide on how to restore WordPress from a backup to learn more.
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 a way to add YouTube videos as fullscreen backgrounds in WordPress?
When used carefully, background videos can instantly grab a visitor’s attention and keep them on your website. This makes them a great choice for landing pages and sales pages.
In this article, we will show you how to add a YouTube video as a fullscreen background on your WordPress website.
Why Use a YouTube Video as a Fullscreen Background?
When visitors first land on your WordPress website, you only have a few seconds to grab their attention and get them to stay.
An engaging and eye-catching video background is a great way to keep visitors on your site. Plus, there are many different WordPress themes that support video backgrounds.
However, uploading and hosting a video on WordPress can take a lot of bandwidth. Depending on your WordPress hosting plan, you might even have to buy extra storage.
One solution is to add a YouTube video as a fullscreen background. In this way, you can stand out from your competitors without slowing down your website or taking up extra storage.
That said, let’s see how you can add a YouTube video as a fullscreen background on your WordPress website.
How to Add YouTube Video as Fullscreen Background in WordPress
The easiest way to add a YouTube video as a fullscreen background is by using Advanced WordPress Backgrounds. This plugin adds a new Background block that allows you to create a fullscreen background using any color, image, or video, including YouTube videos.
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, simply head to the page or post where you want to add a YouTube video as a fullscreen background. You can then go ahead and click on the ‘+’ button.
In the popup that appears, start typing ‘Background AWB’. When the right block appears, give it a click to add it to the page.
In the left-hand menu, you will see three tabs for the different kinds of fullscreen backgrounds you can create: Color, Image, and Video.
Since you want to add a YouTube video, click on the ‘Video’ tab.
This plugin lets you use a self-hosted video as a background. However, videos take up a lot of storage and bandwidth, so you should never upload a video to WordPress.
With that being said, select the ‘YouTube / Video’ tab.
Now, you will need the URL of the YouTube video that you want to use on your WordPress blog.
In a new tab, simply head over to the video and copy the link in the address bar.
With that done, switch back to your WordPress dashboard and paste the URL into the ‘Video URL’ tab.
Now, the WordPress block editor will show a preview of how this background will look. Advanced WordPress Backgrounds changes the size of the video based on the content you add on top of it, so don’t worry if the video currently looks a bit small.
Before you start adding content, it’s a good idea to configure the background’s settings.
By default, the video background is disabled on mobile devices. Smartphones and tablets typically have smaller screens and less processing power compared to desktop computers. With that in mind, it’s a good idea to leave the video background disabled on mobile.
However, if you do want to show the video background on mobile devices, then click to activate the ‘Enable on mobile devices’ toggle.
Out of the box, the block will play the entire YouTube video on a loop.
Another option is to play a specific portion of the video by typing the exact times into the ‘Start Time’ and ‘End Time’ boxes.
You can also stop the video from playing on a loop by disabling the ‘Loop’ toggle.
By default, the video will only play when the visitor can see it in their browser. This helps boost your WordPress speed and performance, so you will typically want to leave the ‘Always play’ toggle disabled.
When you first add the video, it is shown at 100% opacity, so it looks solid.
Depending on your site’s design, you may want to experiment with a semi-transparent video background by dragging the ‘Image Opacity’ slider. This can be a way to create a more subtle YouTube video background.
If you experiment with opacity, then you may also want to try adding a colored overlay.
Simply click to expand the ‘Overlay Color’ section and then use the settings to create different colored overlays.
The Advanced WordPress Backgrounds plugin supports a few different parallax effects. This is a modern web design technique where the background element scrolls slower than the foreground content, which often adds depth to the page design.
To try out the different parallax effects, click to expand the ‘Parallax’ section and then choose an option from the dropdown menu.
After choosing a parallax style, you will get access to some extra settings where you can change the speed. You can also enable and disable the parallax effect on mobile devices.
Similarly, you can experiment with different mouse parallax effects, which cause the background to scroll more slowly when the visitor moves the mouse.
To take a look at these settings, click to expand the ‘Mouse Parallax’ section.
When you are happy with how the YouTube video background is set up, it’s time to start adding content like text, links, and images.
To start, click on the ‘+’ icon in the middle of the Background (AWB) block.
This opens a popup where you can choose the block you want to add. The Advanced WordPress Backgrounds plugin works with all the standard WordPress blocks, so you can add any content you want.
After configuring the first block, simply click on the ‘+’ button again and then add the next block you want to use.
Simply keep repeating this process to create the post or page layout.
When you are happy with how it looks, click the ‘Update’ or ‘Publish’ button to make the page live. Now, if you visit your WordPress website, then you will see the video background in action.
Bonus: How to Add a YouTube Video Feed in WordPress
A video background can grab visitors’ attention while also promoting your YouTube channel. However, if you really want to get more visitors and subscribers on YouTube, then you may want to add more videos to your website.
Simply create a YouTube feed using Smash Balloon’s easy editor, and then add it to any page or post using either shortcode or the plugin’s ready-made block.
You can also use Smash Balloon to embed YouTube playlists, favorites, and live streams on your WordPress website.
The best thing about Smash Balloon is that it doesn’t slow down your site. The plugin’s built-in YouTube caching feature will make sure your site always loads fast, which is great for SEO.
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 to add dynamic content to your WordPress website?
Adding dynamic content to your website enables you to provide visitors with personalized experiences, recommendations, and other interactive elements. That way dynamic content can help increase user engagement and conversions.
In this article, we will show you how to easily add dynamic content in WordPress.
Why Add Dynamic Content in WordPress?
Dynamic text refers to content that changes on a website depending on different factors, including user behavior, time, location, name, and more.
Setting up dynamic text enables users on your WordPress website to see different messages according to different factors.
For example, you can use dynamic text to display the name of the user who is currently logged in to your website.
It can even help convert users into customers or subscribers by showing that your website cares about its visitors, which creates a positive impression and builds trust.
Plus, dynamic content can increase sales and signups on your website. For example, you can show the current date dynamically for a countdown sale or discount offer, and it will automatically update each day. This can create a sense of urgency and lead to more conversions.
That being said, let’s take a look at how to add dynamic content in WordPress. You can use the quick links below to jump to the method you wish to use:
Next, you need to visit SeedProd » Landing Pages from the WordPress admin sidebar.
Once you are there, click on the ‘Add New Landing Page’ button.
This will direct you to the ‘Choose a New Page Template’ screen, where you can select any of the pre-made templates for your landing page.
Upon template selection, you will be asked to enter a page name and choose a URL.
After entering this information, just click on the ‘Save and Start Editing the Page’ button to continue.
This will launch SeedProd’s drag-and-drop page builder, where you can now start editing your page. For more detailed instructions, you may want to see our guide on how to create a landing page in WordPress.
Next, simply drag and drop the Heading or Text block from the left sidebar onto the landing page. Then, click on the block to open up its settings in the left sidebar.
Once you have done that, you need to click the ‘Insert Dynamic Text’ button.
This will open up a ‘Dynamic Text Replacement’ prompt on the screen.
From here, you should select the ‘DateTime’ option if you want to set up a time or date dynamically. This can be helpful if you want to display the time limit for a sale or discount offer on your website.
After that, simply select a date format from the dropdown menu and click the ‘Insert’ button.
If you don’t see your preferred format in the dropdown menu, then you can click on the ‘Learn More’ link at the top to see other formats.
If you want to add a location, name, country, multiple language support, page title, email address, postal code, or other dynamic content, then you need to select the ‘Query Parameter’ option.
After that, add the dynamic text factor under the ‘Parameter Name’ option.
For instance, if you add dynamic text for names in the ‘Parameter Name’ option, then everyone who is logged into your site will be shown their name like ‘Hey John’ instead of ‘Hey There’ on the page.
Or if you add dynamic text for an email address, then users will be shown their email address on your landing page every time they log in.
Similarly, if you want to display the location of every user dynamically, then you can enter ‘location’ as the parameter name.
Next, add the default value that the dynamic text will revert to if the location is not available in the URL parameter.
For example, if a visitor opens up your site and their location is not available in the URL, then the dynamic text might say ‘Stores Near You’ instead of ‘Stores Near Florida’.
After that, simply click the ‘Insert’ button to add the dynamic text.
Once you have done that, click the ‘Save’ button at the top to store your settings. Finally, click the ‘Publish’ button to make your landing page live.
Now visit your website to check out the dynamic content in action.
This is what it looked like on our demo website.
Method 2: Add Dynamic Content Using OptinMonster
If you want to add dynamic content to your advertising campaigns, including popups or floating bars, then this method is for you.
OptinMonster is the best lead generation and conversion optimization tool on the market. It allows you to show personalized campaigns to users without using any code.
It also comes with a dynamic text replacement feature that enables you to add dynamic content to your campaigns using smart tags.
First, you will need to sign up for an OptinMonster account because the paid tool allows you to add dynamic content.
Simply visit the OptinMonster website and click the ‘Get OptinMonster Now’ button to set up an account.
Upon activation, you will see the OptinMonster setup wizard in the WordPress admin panel.
From here, click the ‘Connect Your Existing Account’ button to connect your WordPress site to your OptinMonster account.
After that, a new window will open up on the screen.
Simply click the ‘Connect to WordPress’ button to move ahead.
Once you have connected your OptinMonster account with WordPress, head over to the OptinMonster » Campaigns page from the WordPress admin sidebar.
Next, you need to click on the ‘Create Your First Campaign’ button to start a campaign.
This will take you to the ‘Templates’ page, where OptinMonster offers different campaign types that you can use to show various types of content or targeted messages to your users.
For instance, if you want to show dynamic content inside a WordPress post or page, then you can choose the Inline campaign type.
After selecting a campaign type, you can choose any of the pre-made templates for that specific campaign.
You will then be asked to enter a name for it and click the ‘Start Building’ button.
This will take you to OptinMonster’s campaign builder interface. It is a drag-and-drop tool where you can design your campaign with a live preview.
From here, drag and drop the Text or Heading block from the sidebar on the left into the campaign. After that, just select some text in the block to open up the text editor at the top of it.
Next, you must click the ‘Smart Tags’ icon at the right corner of the text editor to open up a dropdown menu with a list of smart tags
From here, you can select any of the smart tags to add dynamic content to your campaign.
For instance, you can use the {{form_first_name}} smart tag to add the name of the user at the top to make the campaign feel more personalized.
Now, all the logged-in users on your site will see their names in the campaign.
There are other smart tags that show the campaign name, email address, postal code, country, province, year, month, date, coupon code, page URL, and more.
For example, using the smart tag for countries will display the country name of each user who has logged in and is currently viewing your campaign.
Similarly, using a date smart tag will help you display the time limit for a sale without manually updating it every time.
Once you have chosen your smart tag(s), just click the ‘Save’ button at the top to store your settings.
Finally, switch to the ‘Publish’ tab from the top and click on the ‘Publish’ button to make your campaign live.
Now, you can visit your website to check out the campaign with dynamic content.
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 allow blog users to moderate comments in WordPress?
If your site gets a lot of comments, then it can be difficult to moderate them all. One solution is creating a separate user role so that other people can manage the comments for you.
In this article, we will show you how to allow blog users to easily moderate comments on your WordPress blog.
Why Allow Blog Users to Moderate Comments in WordPress?
Comment moderation can take a lot of time and effort, especially for big blogs that get lots of comments. If you are slow to approve comments or delete spam, then visitors may stop interacting with you.
By giving blog users the power to moderate comments, you can combat spam and deliver a better experience for your visitors.
These users might be members of your customer support team, your community manager, or even an active and trusted commenter on your WordPress blog.
By default, WordPress doesn’t let you create a user who is only responsible for moderating comments. With that being said, let’s see how you can easily allow blog users to moderate comments using a WordPress plugin.
Simply use the quick links below to jump straight to the method you want to use.
Method 1: Add a Comment Moderator Role to Specific Users
The Comment Moderation Role plugin allows you to quickly and easily give a comment moderator role to specific users. This plugin creates a new WPB Comment Moderator role that enables the user to approve, decline, or edit comments on any post without giving them access to other parts of the WordPress dashboard.
The first thing you need to do is install and activate the plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, you will have access to a new user role called ‘WPB Comment Moderator’.
To assign this role to an existing user, simply go to Users » All Users. Then, check the box next to that person’s username.
After that, simply open the ‘Change role to…’ dropdown menu and select the ‘WPB Comment Moderator’ role.
You can then go ahead and click on ‘Change’.
Now, this person will have access to the WordPress comment moderation panel.
You can also create a new user and assign them the comment moderator role. To do this, simply go to Users » Add New and enter the person’s information, such as their email address.
Next, you need to open the ‘Role’ dropdown and select ‘WPB Comment Moderator’.
When you are happy with the information you have entered, just click on the ‘Add New User’ button.
Now, this person can log in to their account and see a comment moderation dashboard, similar to the image below.
As you can see, this person can only moderate comments and edit their profile. All other WordPress admin dashboard features are hidden.
Method 2: Add Comment Moderation Capabilities to Any User Role
You can also add the comment moderation permission to a user role or even create a completely new user role for managing your site’s comments.
This is a great choice if you want to allow multiple people to moderate comments.
For example, you might create a comment moderation team or give your site’s Contributors permission to moderate comments. This makes it easy for guest bloggers to interact with their readers.
The easiest way to edit user permissions in WordPress is by using the Members plugin. This free plugin allows you to customize the permissions for every user role and even create completely new roles.
The first thing you need to do is install and activate Members. For more details, see our step-by-step guide on how to install a WordPress plugin.
Upon activation, go to the Members » Roles page to see all the different user roles on your WordPress website.
To start, you can add the comment moderation permission to any existing user role.
To do that, simply hover over that role and then click on the ‘Edit’ link when it appears.
The left column shows all the different types of content, such as reusable blocks and WooCommerce products. Simply click on a tab, and you will see all the permissions for that content type.
To allow users to moderate comments, you need to select the ‘General’ tab in the left-hand menu. Then, find ‘Moderate Comments’ and check the ‘Grant’ box.
With that done, simply click on ‘Update’ to save your changes. Now, anyone with this user role can moderate your website’s comments.
Another option is to create a new user role by going to Members » Add New Role. You can now type in a title for the new role, such as Community Manager, Comment Moderator, or something similar.
After that, you can add the comment moderator permission to this role by following the same process described above. To give this role additional permissions, simply check any of the other ‘Grant’ boxes.
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 free trial subscriptions in WordPress?
Subscriptions are a great way to get consistent, recurring revenue for your business. However, it can be difficult to convince people to sign up for long-term subscriptions.
In this guide, we’ll show you how to get more signups by adding free trial subscriptions to your WordPress website.
Why Add Free Trial Subscriptions in WordPress?
By adding subscriptions to your website, you’ll have a more consistent cash flow, fewer payment errors, and fewer payment delays. However, customers often want to try before they buy, especially if you’re selling longer-term or more expensive subscriptions.
With that being said, it’s a good idea to offer free trials for all your subscriptions. For example, you might give customers a free month’s trial of your subscription box service or create a free one-week pass for your online yoga classes.
If customers enjoy the free trial, then they might pay for a premium subscription. Even if shoppers don’t sign up straight away, you can still use their contact information to do lead generation. For example, you might send them exclusive coupon codes or target them with web push notifications.
With that being said, let’s see how you can add free trial subscriptions in WordPress. Simply use the quick link below to jump straight to the method you want to use.
Method 1: Easy Digital Downloads (Free Trial For Software and Digital Products)
Do you want to offer a free trial subscription for digital products? Maybe you’re planning to sell subscriptions for online courses, a stock photography website, a digital music store, or something else.
The easiest way to offer free trial subscriptions for digital products is by using Easy Digital Downloads. This plugin lets you easily sell ebooks, PDF files, audio files, videos, and any other type of digital product.
Even better, if you’re a SiteGround customer then the Easy Digital Downloads plugin comes pre-installed, so you can start selling subscriptions and digital products straight away.
In this guide, we’ll show you how to create a free trial for an all-access pass. This pass will look just like any other digital product on your online store.
After signing up for the free trial, customers will be able to view, access, and download different products on your online store.
Customers can simply click on a link inside their account, to see all the products that are included in their free pass.
To stop customers from abusing their trial, you can set daily download limits, limit the free pass to specific product categories, and more.
With all that in mind, we’ll be using three extensions to create a user-friendly ‘all access’ free trial. You’ll need to buy the Extended or higher license for Easy Digital Downloads in order to download these three extensions.
After setting up Easy Digital Downloads, it’s time to install the extensions by going to Downloads » Extensions.
On this screen, find the All Access, Free Downloads, and Recurring Payments extensions.
For each extension, click on the ‘Install’ button.
Create a Free Trial Subscription in WordPress
With that done, you’re ready to create a free all access trial. To get started, head over to Downloads » Downloads in the WordPress dashboard.
On this screen, click ‘Add New.’
You can now type in a name for the subscription.
This will be visible to customers, so it’s a good idea to use something descriptive.
After that, scroll to the ‘Download Options’ section. Under ‘Pricing Options,’ type in 0.
Next, check the box next to the following option: ‘Enable free trial for subscriptions.’
Now, it’s time to turn this subscription into a free all-access pass that customers can use across your entire online store.
To do this, simply scroll to the ‘All Access’ section and check the following option: Convert this product into an “All Access” pass.
Limit the Trial to Specific Product Categories (Optional)
By default, the free trial gives customers access to all your products. However, you can restrict the free trial to specific product categories. For example, if you create and sell ebooks then you might include some books in the free trial, and keep others for paid subscribers.
To restrict the free trial to specific categories, simply click on the ‘x’ next to ‘All Products.’
After that, you can click on the ‘Type to search categories’ dropdown and start typing in the category you want to include in the free trial.
When the right category appears, click to select it.
Set a Time Limit
With that done, you can choose whether to make the free trial permanent or to set a time limit.
If you’ve restricted the free trial to specific product categories, then it may make sense to choose ‘Never Expires.’ For example, if you sell digital art and graphics then you might allow customers to download as many watermarked images as they want, forever. However, they’ll need to buy a subscription in order to remove the watermark.
Just be aware that Easy Digital Downloads also allows you to set a download limit. This means you can use ‘Never Expires’ while also limiting how many items the customer can download.
To create a never-ending free trial, open the ‘All Access Duration’ dropdown menu and choose ‘Never Expires.’
Another option is to set a time limit. This works particularly well for digital products that take a while to get through or for products the customer will want to access over and over again.
For example, if you create and sell online courses then you could offer a two-day free trial, so customers will need to buy a subscription to finish their training.
To set a time limit, open the ‘All Access Duration’ dropdown and choose from years, months, weeks, or days. You can then type a number into the field that appears.
Add a Daily, Weekly, Monthly, or Yearly Download Limit
You can also type in a Download Limit. This can protect your site from customers who might try to abuse the free trial. For example, if you sell Excel or Google Spreadsheets in WordPress, then you might set a download limit so customers can’t download your entire product catalog while on a free trial.
By default, Easy Digital Downloads has a download limit of 0, which means the customer can download as many products as they want. To change this, type a number into the ‘Download Limit’ field.
You can then make this limit per day, week, month, or per year using the dropdown that appears.
Adding Variable Pricing to Your Free Trial (Optional)
Are you using variable pricing on your online marketplace? Then you may want to include specific price variations in the free trial.
For example, if you’ve created Standard and Deluxe price variations, then you may want to include Standard in the free trial, while keeping the Deluxe version for paying users only.
If you’ve enabled variable pricing, then Easy Digital Downloads includes all variations in its free trial by default.
To change this, find ‘Total Price Variations’ and type in how many variations you want to include in the free trial. Depending on the number you use, you’ll see a list of the different variations on your online store.
Simply check the box next to each variation you want to include in the free trial.
Customizing the Purchase Confirmation Page and Email
When a customer downloads a product using their free trial pass, Easy Digital Downloads will show them a Purchase Confirmation page.
It will also send a confirmation message to their email address.
By default, both the Purchase Confirmation page and email contain the following link: Click here to use your All Access Pass. This takes the customer to a page where they can download their free products.
To change the link text, type into the ‘Receipts: All Access Link Message’ box.
You can also change the page where Easy Digital Downloads will send customers when they want to download their free products.
To do this, simply create a new page in WordPress and then add the following shortcode:
This will show all the products the customer can download while on a free trial. You can then add other content, such as text, images, a contact form, or anything else you want to include.
After publishing the page, simply add its URL to the ‘Receipts: Link URL’ field.
When you’re happy with how the free trial is set up, click on the ‘Publish’ button.
Create a Premium Subscription
With that done, you may want to create a premium ‘all access’ subscription. When their free trial expires, customers can upgrade to this subscription and continue enjoying your content.
To create a premium subscription go to Downloads » Add New.
You can then type in a name for the subscription and set the price, by typing into the ‘Pricing Options’ field.
You can also make this a recurring subscription, add an optional sign-up fee, and more using the settings under ‘Download Prices.’
With that done, scroll to the ‘All Access’ section. At this point, you can turn the subscription into an all-access pass, add a download limit, and more by following the same process described above.
When you’re happy with how the premium all-access subscription is set up, don’t forget to click on ‘Publish’ to make it live.
Remove the Checkout for Free Trial Users
After creating the free trial subscription, you’ll want to get as many signups as possible. With that being said, it’s a good idea to allow customers to start the free trial without going through the checkout screen.
Easy Digital Downloads can hide the checkout screen when a customer is claiming a free product, including your free trial subscription.
To do this, simply go to Downloads » Settings, and then select the ‘Marketing’ tab. Next, click on ‘Free Downloads’ to hide the checkout.
After that, you can use ‘Button Label’ to specify the text you’ll show when products are available for free download.
By default, this is ‘Download Now.’
You can replace this with your own custom messaging.
Simply go ahead and type into the ‘Button Label’ field.
There are more settings that can help you do lead generation like a pro. For example, you can collect the person’s name and email address, even when they’re signing up for a free trial or downloading a free product. However, we recommend keeping things simple, as this will often get you the most signups.
When you’re happy with the changes you’ve made, click on ‘Save Changes.’ Now, if you visit the free trial product page, you’ll see the new button text in action.
Create Expiration Reminder Emails
Free trials can generate leads, but the goal is to convert those people into paying customers.
With that in mind, you may want to email people when their free trial is about to expire. This will encourage them to buy a premium subscription, so they can continue accessing your digital content.
​​Easy Digital Downloads integrates with all the best email marketing services. However, you can also create reminder emails using the Recurring Payments extension you installed earlier.
To use this extension, go to Download » Settings. Then, select the ‘Emails’ tab followed by the ‘Recurring Payments’ link.
On this screen, check the box next to ‘Send Expiration Reminders.’
After that, select ‘Add Expiration Reminder.’
This takes you to a screen where you can type in an email subject and a message.
To make the email more personal, it’s a good idea to use template tags. Easy Digital Downloads will replace these tags with real values such as the customer’s name, the expiration date, and the name of their subscription.
You can see all the available template tags underneath the small text editor.
Just be aware that Easy Digital Downloads will send the message to all customers, and not just the people on your free trial.
When you’re happy with the information you’ve typed in, click on Add Reminder Notice.
Now, Easy Digital Downloads should notify customers when their subscription is about to expire. However, sometimes your WordPress hosting server may not be properly configured or email providers such as Gmail might use filters that wrongly flag your emails as spam.
To get more conversions, your emails need to arrive in the customer’s inbox and not in the spam folder. For that reason, we recommend using a WordPress SMTP plugin and provider to improve your email deliverability
WP Mail SMTP is the best WordPress SMTP plugin on the market. It allows you to connect your WordPress site with a mailer service. This means your expiration reminder and other messages will always arrive safely in the customer’s inbox.
Method 2. MemberPress (Free Trial For Memberships or Courses)
A membership website allows users to pay for premium content, online courses, features, and access to a community. However, these members-only features are usually hidden behind a paywall in WordPress, so visitors can’t see what the membership includes.
With that in mind, you may want to offer visitors a free trial so they can try before they buy. The easiest way to do this is by using MemberPress.
MemberPress is an all-in-one membership plugin that allows you to accept payments, add unlimited membership levels, create gated content, restrict access based on different membership levels, and much more. It also lets you create as many free trials as you want, including different trials for different membership levels.
First, you’ll need to install and activate the plugin. If you need help, then please see our guide on how to install a WordPress plugin.
With that done, you can set the price by typing into the ‘Price’ box.
This is how much members will pay once the free trial expires.
You can only create a free trial for recurring memberships. However, if you want to charge members a one-time fee then there’s a workaround, which we’ll be covering shortly.
With that being said, open the ‘Billing Type’ dropdown and choose ‘Recurring.’
Next, you need to set the billing interval for the recurring payment. This is how often your members will be charged once the free trial expires.
Simply open the ‘Interval’ dropdown and choose an option from the list, such as monthly or yearly billing.
Want to use a different interval? Then select ‘Custom’ instead.
You’ll now see some new controls where you can set a custom interval.
Create a Free Trial Membership Subscription
With that done, check the box next to ‘Free Trial.’
You can now specify how many days the free trial will last, by typing into the ‘Trial Duration’ field. For example, if you want to offer a one-month trial then you would type in ‘30.’
After that, you’ll need to type in the ‘Trial Amount,’ which is the total cost of the subscription trial period before tax. You’ll typically want to type ‘0’ into this box.
Finally, you can choose whether to limit customers to one free trial by checking or unchecking the ‘Allow Only One Free Trial’ box. If you check this box, then customers who cancel their subscription and then re-subscribe won’t get another free trial.
You’ll typically want to leave the box checked, so customers can’t abuse the free trial. However, if you only offer a very short trial then you may want to allow customers to have multiple free trials.
Just be aware that coupons will override this setting, so it’s still possible to offer multiple free trials to the same customer.
Create a Lifetime Membership (Optional)
As already mentioned, you can only offer a free trial for recurring memberships. However, it is possible to create a trial for lifetime memberships, by changing a few MemberPress settings.
To do this, check the ‘Limit Payment Cycles’ box and set the ‘Max # of Payments’ to 1.
After that, open the ‘Access After Last Cycle’ dropdown and select ‘Lifetime Access.’
Now, once the trial expires customers will need to pay a one-time fee for lifetime membership.
Publish the Free Trial Membership Subscription
With that done, you can make any other changes to the membership level.
When you’re happy with how the membership is set up, it’s time to make it live by clicking on the ‘Publish’ button.
To see how the membership looks to potential customers, go to MemberPress » Memberships. On this screen, you’ll see the membership level you just created.
Here, just hover your mouse over the membership level and click on the ‘View’ link.
WordPress will now show the membership signup form in a new tab.
Do you want to add a free trial to more membership levels? Then simply follow the same process described above.
Once you’ve added a free trial to your membership site, you’ll want to encourage visitors to sign up for the free trial. This might mean mentioning the free trial in your email newsletter, creating popups using a WordPress popup plugin, promoting it on social media, and more.
Method 3. WooCommerce Subscriptions (Free Trial For Physical Products)
If you want to sell digital products online, then we recommend using Easy Digital Downloads. However, if you want to sell physical products, then WooCommerce is the world’s most popular eCommerce platform.
By default, WooCommerce doesn’t allow you to offer free trial subscriptions. However, it’s easy to add this missing feature using WooCommerce Subscriptions.
This plugin adds a new ‘simple subscription’ product type to your WooCommerce store. You can add this product type to any existing item, or create new subscription products. For example, you might let shoppers try a product before they buy it, or maybe you will send them a sample subscription box from your online boutique shop.
When a customer visits a subscription product, they’ll see a ‘Sign up now’ button instead of the standard ‘Add to cart’ call to action button.
Customers can manage all their subscriptions by logging into their WooCommerce account, and then visiting the new ‘My Subscriptions’ section.
Here, they can see when the subscription started, how much it costs, the subscription status, and more. The customer can also cancel, reactivate, and renew their subscriptions directly from this page, without having to contact you directly.
In this way, a customer who is enjoying a free trial can quickly and easily upgrade to a premium subscription.
In this guide, we’re going to assume you’ve already set up a WooCommerce store. If you haven’t, then you may want to check out our complete guide to WooCommerce made simple.
As soon as the plugin is active, you’re ready to add free trial subscriptions to WooCommerce. Simply go to Products » Add New.
You can now create this product in exactly the same way you create any WooCommerce product. For example, you can type in the product’s title, add a description, or create a WooCommerce product gallery.
After entering all this information, scroll to the ‘Product Data’ box.
Here, open the dropdown menu and choose ‘Simple subscription.’
This adds some new settings that you can use to create a subscription and add a free trial.
To start, type in the ‘Subscription price.’
Then, use the dropdown menus to choose how long the subscription will last. In the following image, the subscription will cost $20 per month once the free trial expires.
You can now choose whether the subscription will last forever, or expire after a set amount of time. Just be aware that the expiration length doesn’t include the free trial. This means that if the subscription expires in 1 month and you offer a one-month free trial, then the subscription will last for 2 months.
Another option is to give the customer lifetime access. To do this, open the ‘Expire After’ dropdown and choose ‘Never expire.’
Next, you may want to add a sign-up fee.
Just be aware that WooCommerce will charge this fee no matter whether the customer is buying a subscription or signing up for a free trial. With that in mind, we don’t recommend adding a sign-up fee to products that have a free trial subscription.
With that done, you can specify how long the free trial will last by opening the dropdown that shows ‘days’ by default, and then choosing an option from the list.
After that, just type in how many days, weeks, months, or years the free trial should last. Note that the free trial can’t last longer than 90 days, 52 weeks, 24 months, or 5 years.
You can now make any other changes to the product. When you’re happy with how the product and subscription are set up, either click on ‘Update’ or ‘Publish’ to make the trial live.
You can now create free trial subscriptions for other products, by following the same process described above.
Once you’ve added one or more subscriptions to your WooCommerce website, you’ll want to get as many signups as possible. With that in mind, you should allow visitors to use their preferred payment method.
By adding the free Stripe Payment Gateway for WooCommerce plugin to your website, you can collect payments through Visa, MasterCard, Google Pay, Apple Pay, and more.
Simply install the plugin and the onboarding wizard will guide you through the process of adding more payment methods and enabling express checkout.
Method 4. WP Simple Pay (Free Trial For Custom Services)
Many freelancers, consultants, trainers, and other business owners sell their services as a subscription. For example, if you run a yoga studio then you might offer a one month free trial of your personalized training program.
The best way to offer a free trial for custom services is by using WP Simple Pay. It’s the best Stripe payment plugin for WordPress and lets you accept payments, manage invoices, and offer free trials without having to set up a shopping cart, or add products to an online store.
Note: There is a free version of WP Simple Pay that allows you to accept credit cards, Apple Pay, iDEAL, and other payment methods. However, in this guide we’ll be using the premium plugin as it allows you to offer free trials.
Set Up the WP Simple Pay Plugin
First, you’ll need to install and activate the WP Simple Pay plugin. If you need help, then please see our guide on how to install a WordPress plugin.
Upon activation, the plugin will automatically launch the setup wizard. Go ahead and click the ‘Let’s Get Started’ button.
With that done, click the ‘Activate and Continue’ button.
Connect WordPress to Your Stripe Account
In the next step, you’ll need to connect your Stripe account to WP Simple Pay. Stripe is a popular payment gateway, and it’s the easiest way to accept credit card payments in WordPress, so it’s a great way to sell custom services online.
To get started, simply click the ‘Connect with Stripe’ button. You can then either log into your Stripe account, or create a new account if you haven’t already registered with Stripe.
After connecting WP Simple Pay with Stripe, the setup wizard will ask you to configure its emails. You can choose whether to receive emails for payment receipts, upcoming invoices, and payment notifications.
You’ll also need to enter the email address where WP Simple Pay will send the messages.
Simply click the ‘Save and Continue’ button when you’re done.
Create a Subscription Form With a Free Trial
Now, you’re ready to create a subscription form that offers a free trial. Go ahead and click on the ‘Create a Payment Form’ button.
To offer a free trial, hover over the ‘Recurring Services with Trial Period Form’ template. When it appears, click on the ‘Use Template’ button.
This will take you to the payment form editor.
To start, you can rename the form and type in an optional description. By default, the description is ‘Try our service free for 30 days,’ but you can change this to anything you want.
By default, WP Simple Pay will create an on-site payment form. However, you may want to show a payment button instead. When the visitor clicks the button, they’ll see the payment form in a popup.
To create a popup, check the box next to ‘Open in an overlay modal’ box.
Another option is to host the payment form on Stripe’s site, by opening the ‘Type’ dropdown.
Here, select ‘Off-site Stripe Checkout form.’
When a customer buys a subscription, WP Simple Pay will redirect them to its built-in Payment Success Page. If you want to send visitors to a different page, then select either ‘Specific Page’ or ‘Redirect URL.’
You can then either type in the URL or select the page you want to use instead. For example, you might send subscribers to a custom thank you page, or a page where they can manage their free trial.
Add a Price to Your Subscription Form
When you’re ready, select the Payment tab.
Here you can set the payment mode to either live or testing. Testing mode allows you to complete the purchasing process without getting charged, so it’s perfect for testing new subscriptions on your website.
If you do select ‘Test Mode,’ then remember to come back to this page and change the mode to ‘Live’ when you’re finished testing.
Next, you can set the price of your subscription and the currency using the ‘Amount’ settings.
With that done, you can choose how often WP Simple Pay should charge subscribers.
Simply open the ‘Billing Period’ dropdown and choose day, week, month, or year. Then, type a number into the field next to the dropdown menu.
By default, WP Simple Pay offers customers a 30 day free trial.
If you want to make the free trial longer or shorter, then simply type a number into the ‘Free Trial’ field.
Sometimes, you may want to charge subscribers a set up fee. For example, if you’re a life coach then this extra fee may cover the time and effort required to add new clients to your admin system.
To charge an additional fee, simply type an amount into the ‘Setup Fee’ field.
With that done, scroll to the ‘Payment Methods’ section.
Here, you can check the box next to any additional payment methods you want to offer, such as Klarna payments or ACH payments.
By offering visitors a choice of payment methods, you may be able to get more subscribers. However, try not to offer too many options, as this can become confusing.
Depending on the payment methods you select, you may see a ‘Configure’ link. In this case, click on ‘Configure’ and then follow the onscreen instructions to set up the payment gateway or method.
Customize the WP Simple Pay Subscription Form
With that done, you’re ready to build the subscription form.
Simply click on ‘Form Fields’ to open WP Simple Pay’s form builder.
The template already collects some basic information about the customer, such as their email address and credit card information.
The following image shows how the default form will look on WordPress.
To customize any of the default fields, simply click select it.
The section will expand to show all the settings you can customize, such as changing the field’s label or adding some placeholder text.
You can also remove fields from the subscription form.
Simply click to expand the field, and then select ‘Remove.’
Do you need to collect more information from your new subscribers? For example, you might need their tax ID or phone number.
Just click on the ‘Form Fields’ dropdown and then choose a field from the list. After that, click on ‘Add Field.’
Finally, you can change the order the fields appear in your form using drag and drop.
As you’re customizing the form, you can click on ‘Preview’ to see how it will look on your blog or website.
When you’re happy with the form, click ‘Publish’ to store your settings.
Add the Subscription Form to Your WordPress Website
Now, you’re ready to add the form to your WordPress blog using either a block or shortcode.
The easiest method is to use a block, so open the page or post where you want to show the subscription form.
Then, click on the plus (+) sign and type in ‘WP Simple Pay.’
When the right block appears, click to add it to the page or post.
With that done, open the dropdown menu in the WP Simple Pay block, and choose the form you want to display.
When you’re finished, click on either ‘Update’ or ‘Publish.’
Now, if you visit your website you’ll see the subscription form live.
Another option is to add the subscription form using shortcode. To get the shortcode, head over to WP Simple Pay » Payment Forms in the WordPress dashboard.
Here, just find the subscription form and click on its ‘Copy Shortcode’ button.
Now you just need to paste the shortcode into any page, post, or widget-ready area. For step-by-step instructions on how to place the shortcode, 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.