How to Add Title and NoFollow to Insert Link Popup in WordPress

Wp Plugins

Do you want to add a title or nofollow tag to your WordPress links?

By default, WordPress doesn’t provide a way of adding title and nofollow attributes when creating links with the WordPress block editor.

In this article, we’ll show you how to add options for title and nofollow attributes to the Insert Link popup in WordPress.

How to Add Title and NoFollow to Insert Link Popup in WordPress

Why Add Title and NoFollow Attributes to Links in WordPress?

When writing content, you can add links to interconnect your posts and pages and refer to articles on other sites. These links will tell visitors to your WordPress website where they can find more information on a topic.

It’s helpful to give your links a title. This will appear when someone points their mouse cursor over a link.

A Link With a Title

This can be reassuring to your readers because it makes it clear where the link leads. It also improves your site’s SEO.

SEO experts also recommend that you use a nofollow attribute when linking to external websites. This attribute tells search engines that they can crawl these links, but not pass on any link authority to these websites.

However, when you click the Insert Link icon in WordPress, there are no options to add a link title or to make the link nofollow. The popup only lets you add the Link URL and gives an option to open the link in a new window.

By Default, WordPress Does Not Allow You to Add Title and NoFollow Attributes

With that being said, let’s take a look at how to easily add title and nofollow options to the Insert Link popup on your WordPress blog.

How to Add Title and NoFollow to Insert Link Popup in WordPress

The first thing you need to do is install the free All in One SEO Lite plugin. For more details, see our step by step guide on how to install a WordPress plugin.

All in One SEO (AIOSEO) is the best WordPress SEO plugin and helps you improve your website SEO. You just need the free version to add extra attributes to the Add Link popup, but AIOSEO Pro offers even more features to help you rank better in search engine results pages.

Upon activation, you need to configure the plugin using the AIOSEO setup wizard. For detailed instructions, see our ultimate guide on how to set up All in One SEO for WordPress.

Once you’ve done that, the plugin will automatically add extra attributes to the Insert Link popup.

These include a title field and options to add nofollow, sponsored, and UGC (user-generated content) tags.

AIOSEO Adds NoFollow and Title Attributes to the Insert Link Popup

To add the link title, just type it into the ‘Add title attribute to link’ field. When when you save the link, AIOSEO will apply the title and any attributes you toggle on.

We hope this tutorial helped you learn how to add title and nofollow options to the Insert Link popup in WordPress. You may also want to learn how to speed up your WordPress performance or check out our list of must-have plugins to grow your site.

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

The post How to Add Title and NoFollow to Insert Link Popup in WordPress first appeared on WPBeginner.

How to Properly Use the More Block in WordPress

Category Image 091

Do you want to use the More block on your WordPress website?

WordPress gives you several different ways to show a preview of your posts on the archive and homepage. This can help catch the visitor’s attention and get them to read the full post.

In this article, we will show you how you can properly use the More block in WordPress. We’ll also show you how to create an excerpt, just in case you’re using a theme that ignores the More block.

How to properly use the More block in WordPress

When to Use the More Block in WordPress

Many websites use post previews to encourage visitors to check out the full version.

As a WordPress user, you can create post previews in a few different ways. For example, you might use a WordPress accordion plugin or show and hide content using the toggle effect.

By default, most modern WordPress themes automatically show a preview of your posts on the homepage and blog archives instead of the full post. For example, on our blog page we show a few words and then a ‘Read More’ link to see the full blog post.

A WordPress blog archive with Read More buttons

This preview text helps visitors to see more of what topics are available on your blog without having to scroll through every post. It also helps to increase pageviews since your visitors will have to click through to finish reading a post.

You can control exactly what WordPress shows in these previews by using either the More block or an excerpt.

The best choice for your site will vary depending on your WordPress theme. Some themes will ignore any More blocks you create, so you’ll need to use an excerpt instead.

To help you show an engaging preview no matter what theme you’re using, we’ll be covering both More blocks and excerpts.

If you prefer to jump straight to a particular method then you can use the links below.

How to Properly Use the More Block in WordPress

The WordPress block editor has a built-in More block that allows you to specify the exact cut off point for the preview text of any WordPress post. In the classic editor, it was previously known as the More tag.

You can add the More block anywhere in the post, including mid sentence or in the middle of a paragraph.

All of the content above the More block will appear on your blog archive pages and wherever else your posts are listed on your WordPress site. WordPress will also add a ‘Read More’ link to the preview, so visitors can click to read the full version of the post.

The WordPress More block

Note: Every WordPress theme is different and some may override the default ‘Read More’ label. With that in mind, you may see different text on your ‘Read More’ button.

Before you add a More block to your post, it’s important to check that your site is set up to show the latest posts on the homepage. If you are using a static page as your custom homepage, then your theme may ignore the More blocks and use its own settings instead.

Not sure if you’re using a static front page as your homepage? To check, simply go to Settings » Reading in the WordPress dashboard.

The WordPress Settings page

At the top of this screen, you’ll see a ‘Your homepage displays’ section. If ‘Your latest posts’ is selected, then you should have no problems using the More block.

To get started, simply open the post where you want to add a More block. Then, find the spot where you want to create the cut off point for your preview, and click on the + icon to add a new block.

You can then type in ‘More’ and select the right block to add it to your page.

The WordPress More block, formerly the More tag

Some themes have a limit on how many words they will show on their homepage and archive pages. There’s a chance your theme may override the More block if you try to include a very large number of words in your preview. With that in mind, it’s a good idea to create the cut off point early in the post.

You can now carry on writing the rest of your post as normal.

You’ll be able to see the More block when editing your post in the block editor, but your visitors won’t see it when they’re reading the post on your WordPress blog.

Just like any other block, WordPress has some settings that you can use to configure the More block. To see these settings, simply click to select your More block.

In the right-hand menu, you can now choose whether to hide or show the excerpt on the full content page, which is the page you’re currently looking at.

By default, all of the content above the More block will appear on the full content page, as you can see in the following image.

Customizing the WordPress More block

However, you may want to write a custom excerpt that will only appear on your homepage and archive page, and not in the full post itself.

To do this, simply click the ‘Hide the excerpt….’ slider to turn it from white to blue.

Hide the WordPress More block content

Now, everything above the More block will appear on the archive page and homepage only.

Once you’re finished, you can go ahead and save your changes by clicking on the Update or Publish button.

Now if you visit your homepage or blog archive page, you’ll see the preview you just created for this post.

Are you seeing something different?

Then your WordPress theme may be ignoring your More blocks.

Some themes are designed to show excerpts and will override all of your More blocks. If your homepage and blog archives aren’t showing the preview you created using the More block, then you may need to use excerpts instead.

How to Change the More Block’s ‘Read More’ text

By default, the More block will show a Read More link on your archive and homepage.

There are a few different ways to change this text, but you may get slightly different results depending on your WordPress theme. Some themes will override your changes with their own default settings.

To start, it’s worth checking whether you can change the Read More text using the WordPress post editor.

To do this, simply open any post that has a More block. You can then click on the default ‘READ MORE’ text and type in the text that you want to use instead.

Changing the text on the Read More label

After that, either update or publish the page as normal. You can then visit your homepage or blog archive to see whether the Read More text has changed.

If you’re still seeing the original Read More link, then you may need to override your theme’s settings using code.

You can either create a site-specific plugin or use a code snippets plugin like WPCode, and then add the following code to your site:

function modify_read_more_link() {
    return '<a class="more-link" href="' . get_permalink() . '">Check out the full post</a>';
}
add_filter( 'the_content_more_link', 'modify_read_more_link', 999 );

This replaces the default ‘Read More’ text with ‘Check out the full post,’ as you can see in the following image.

You can use any text you want by replacing ‘Check out the full post’ in the code snippet.

An example of a More block with custom text

How to Properly Use Excerpts in WordPress

WordPress has two different ways to show a post preview. We’ve already covered the More block, but you can also create a preview using excerpts.

For the people who visit your WordPress blog or website, previews created using excerpts and the More block look exactly the same. However, some themes are coded to use excerpts, which means they will ignore your More blocks and show an excerpt instead.

If you don’t add an excerpt to a post manually, then WordPress will create one automatically based on the excerpt length defined by your theme. This can lead to previews that cut off mid sentence.

With that in mind, you can choose to create an excerpt manually instead. To do this, simply open a post and then click to expand the ‘Excerpt’ section in the right-hand menu.

Adding an excerpt to a WordPress post

In the ‘Write an excerpt box’ you can then either type in or paste the excerpt that you want to use for the post.

Don’t see an ‘Excerpt’ box in the right-hand menu? Then you can enable this setting by clicking on the three-dotted icon in the upper-right corner.

Once you’ve done that, click on Preferences.

Enabling the WordPress excerpt settings

In the popup that appears, simply click on ‘Panels.’

You’ll now see all the settings that you can add to the right-hand menu. Simply find ‘Excerpt’ and give it a click to turn it from white (disabled) to blue (enabled).

Activating the WordPress excerpts feature

Then, simply close this popup. You should now have access to the ‘Excerpt’ settings in your right-hand menu.

Now, you can create an excerpt following the same process described above.

Once you’ve done that, simply save your changes and visit your site. You will now see your custom excerpt on the homepage and blog archive.

We hope this article helped you learn how to properly use the More tag in WordPress. You may also want to check out our ultimate SEO guide for beginners and the best WordPress landing page plugins.

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

The post How to Properly Use the More Block in WordPress first appeared on WPBeginner.

How to Display Recently Registered Users in WordPress

Category Image 052

Are you looking to display recently registered users in WordPress?

Sometimes you may want to display your recently registered users on your site to create a sense of community and encourage others to become a member, join your forum, or simply create an account. 

In this article, we’ll show you how to display recently registered users on your WordPress site.

How to display recently registered users in WordPress (3 ways)

Why Display Recently Registered Users in WordPress?

If you run a membership site, online course, forum, or any other type of WordPress website that allows for user registration, then you may want to display your recently registered users.

This adds social proof an also give other members a chance to welcome new members to the community. If you run a small business website, then you can even create a filterable directory of your team members or contributors.

There are all kinds of reasons to display your recently registered users in WordPress:

  • Create a resource of shared contact information
  • Showcase a list of donors for your nonprofit
  • Highlight a list of recently registered business owners
  • Encourage new forum sign ups by showing a large and active community

With that said, let’s show you how you can display recently registered users in WordPress. Simply use the quick links below to jump straight to the method you want to use.

Method 1. Display Recently Registered Users with Formidable Forms

The best way to display recently registered users is by using the Formidable Forms plugin. It’s one of the top contact form and best user registration plugins for WordPress in the market. 

Formidable Forms

It comes with advanced features that let you format, filter, and display user-submitted data on the front end of your website, including user profile data.

You can use it to create all kinds of useful online tools like web directories, online calculators, user directories, and more. Plus, you have complete control over how your user directories look and function.

It even integrates with MemberPress, so you can easily display a list of your recently registered members on your membership website

Note: Formidable Forms won’t automatically display all new users. Instead, it gives you complete control over which users and what information is displayed. To display a user in your directory, a separate form will need to be created and filled out. We’ll show you how.

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

Upon activation, you need to go to Formidable » Global Settings and then click the ‘Connect an Account’ button or manually enter your license key and click the ‘Save License’ button.

Enter Formidable Forms license key

You can find this information under your account on the Formidable Forms website.

Next, you need to install the Formidable Directory addon. Depending on your plan, this addon may already be active. 

If not, then you need to go to the Formidable Directory page and click the ‘Get Formidable Directory’ button. After you complete the purchase, it will automatically be added to your account. 

Formidable Directory

Next, go to Formidable Forms » Add-Ons and search for the ‘Directory’ addon.

Then, click the ‘Install’ button.

Install directory addon

After that, navigate to Formidable » Global Settings.

Then, click the ‘Directory’ menu option.

Navigate to Formidable directory

This will automatically start the setup wizard to help you create your user directory. If you haven’t connected your site to Formidable Forms, then you’ll be asked to do that now.

Then, click the ‘Install & Activate’ button to install and activate any required addons.

Install and activate addons

Next, click the ‘User/Member’ box to display your recently registered users and choose a ‘Two Column’ or ‘Table List’ display.

Then, enter a page name for your listing form and your directory page and click the ‘Create Now’ button.

Select user/member and name pages

This will automatically create the necessary forms, views, and pages to display your users, but it doesn’t publish them yet, so you can still make changes.

After that, click the ‘View Page’ button in the ‘Customize Your New Pages’ section.

Click view new page

This will automatically take you to a page with your registered user list. 

It includes a search bar, A-Z filter, and boxes containing each of your registered users.

View registered users page

After that, you need to make your page live.

To do this, simply click the ‘Edit Page’ button at the top of the screen.

Click the edit page button

This brings you the page editor screen. You can edit this page just as you would any other WordPress page.

When you’ve finished editing the page, you need to click the ‘Publish’ button to make it live.

Publish page live

If you want to customize how your registered user directory looks, then go to Formidable » Views.

Then hover over the view that was just created and click ‘Edit’.

Go to formidable views

This brings you to the view editor screen.

Here, you can fully customize how your user directory looks. For example, you could limit the number of users per page, filter and sort the user entries, or add more content to their individual profiles.

Customize user directory in view editor

Once you’re finished making changes, click the ‘Update’ button.

It will automatically update the user directory you published earlier.

Updated user directory example

Publish Your Form to Collect Information From New Users

After you customize and publish your user directory, you’ll need to publish the form connected to the directory too. 

Users who have already registered on your WordPress site will need to fill out this separate form to be listed in the user directory.

First, you need to go to Pages » All Pages and then click on the page that was created earlier, in this case, it’s ‘Add a Listing’.

Go to registration page

This brings you to the page editor screen, where you’ll see the page title and a shortcode.

Next, click the ‘Publish’ button to make your page live.

Publish registration page live

After that, you can view your page with the user registration form. 

New users can use this form to fill out their user directory profile information on your website.

User registration page example

If you want to customize the form fields, then navigate to Formidable » Forms.

Next, click on the form you named earlier, in this case, it’s ‘User Directory Profile’.

Go to formidable form editor

This will bring up the form builder. 

If you want to add new form fields, then simply drag them from the options panel on the left onto your form.

Edit registration form

To delete existing form fields, click on the field and click the ‘Three Dots’ menu option.

Then, click ’Delete’.

Delete form fields

Once you’re finished customizing your form, make sure to click the ‘Update’ button to save your changes, and your form will automatically update.

Method 2. Display Recently Registered Users with Dynamic User Directory

Another way to display recently registered users is with the free Dynamic User Directory plugin.

It’s not as advanced or customizable as Formidable Forms, but it lets you display a simple list of your recently registered users.

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.

After that, you need to go Settings » Dynamic User Directory to configure your directory settings.

First, you can control how your registered user list is sorted in the ‘Sort Field’ drop down and choose which kind of directory type you want to display in the ‘Directory Type’ drop down.

Set main directory settings

After that, you can enable a directory search feature by checking the ‘Directory Search’ box.

If you want to exclude certain user roles, or specific users, then you can select them from the drop down list.

Enable directory search and user roles

Next, you can control how your directory looks and the user information that will display in the ‘Listing Display Settings’ section.

You have control over the user’s name, avatars, borders, and more.

Set directory listing display settings

Below that, in the ‘Directory Totals Settings’ meta box, you can choose the total number of users, customize the text, and more.

Displaying the total number of users can be helpful if you want to use social proof to encourage new users to create an account on your site.

Choose to display directory totals

Next, you can customize how the letter links and pagination displays on your user list.

You can set the number of users to show per page, change the spacing, and more.

Change how letter links and pagination displays

Once you’re finished, click the ‘Save options’ button at the bottom of the screen to save your directory.

This will create and display a shortcode for your user directory at the top of the page. You need to copy this to add your directory to your site.

Copy user list shortcode

Then, open the page, post, or widget area to display your list of users.

Next, click the ‘Plus’ add block icon, search for ‘Shortcode’, and select it.

Add shortcode block

After that, simply paste the shortcode into the box.

Then, click the ‘Publish’ or ‘Update’ button.

Add user list shortcode to block

Now, you can view your list of recently registered users on your site.

If you want to add the list of recently registered users to a post or widget area, then simply follow the above steps.

Dynamic User Directory plugin example

Method 3. Display Recently Registered Users by Adding Code to WordPress

Another way you can display your recently registered users is by adding code to WordPress. If you haven’t done this before, then see our guide on how to copy and paste code in WordPress.

Then, you can add the following code snippet to your theme’s functions.php file, or by using a code snippets plugin like WPCode (recommended): 

function wpb_recently_registered_users() { 

global $wpdb;

$recentusers = '<ul class="recently-user">';

$usernames = $wpdb->get_results("SELECT user_nicename, user_url, user_email FROM $wpdb->users ORDER BY ID DESC LIMIT 5");

foreach ($usernames as $username) {

if (!$username->user_url) :

$recentusers .= '<li>' .get_avatar($username->user_email, 45) .$username->user_nicename."</a></li>";

else :

$recentusers .= '<li>' .get_avatar($username->user_email, 45).'<a href="'.$username->user_url.'">'.$username->user_nicename."</a></li>";

endif;
}
$recentusers .= '</ul>';

return $recentusers;
}

This code snippet creates a simple list of your recently registered users and displays the avatar image and username.

After that, there are two different ways you can display your recently registered users. The first is by adding a template tag to your theme’s template files, like sidebar.php, footer.php, and more.

To learn more, see our WordPress template hierarchy cheat sheet to help you find the right theme template file.

Then, add the following template tag code snippet:

<?php wpb_recently_registered_users(); ?>

The second method is easier for beginners and lets you display newly registered users by using a shortcode.

First, add the following code snippet to your theme’s functions.php file or by using a code snippets plugin, just below the code you added earlier.

add_shortcode('wpb_newusers', 'wpb_recently_registered_users');

This code will create the following shortcode you can use in your posts, pages, and widget areas. 

[wpb_newusers]

To add the shortcode to your website, simply open the page where you want the list of users to display.

Then, click the ‘Plus’ add block icon, search for ‘Shortcode’, and select it.

Add shortcode block

After that, paste the shortcode you copied above into the shortcode box.

When you’re done making changes, click the ‘Update’ or ‘Publish’ button to make your changes live.

Paste shortcode into block

You can follow the same steps by adding the shortcode to a post or a widget area.

Now you can view your list of recently registered users. To adjust how they appear, you would need to add custom CSS to your website.

Registered user list example

We hope this article helped you learn how to display recently registered users in WordPress. You may also want to see our guide on how to get a free SSL certificate, and our expert picks of the best business phone services for small businesses.  

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

The post How to Display Recently Registered Users in WordPress first appeared on WPBeginner.

How to Add Underline and Justify Text Buttons in WordPress

Category Image 091

Do you need to underline or justify text in WordPress?

WordPress used to have both justify and underline text buttons in the visual editor. However, they have been removed and are no longer available.

In this article, we’ll show you how to add underline and justify text buttons in WordPress.

How to Add Underline and Justify Text Buttons in WordPress

Why Add Underline and Justify Text Buttons in WordPress?

Would you like to restore the missing underline and justify buttons when editing posts and pages on your WordPress website? These buttons were removed from the post editor in WordPress 4.7, but luckily there’s a way to bring them back.

However, there are a few reasons you should consider not underlining and justifying text on your website.

First, underlined text can look like links, and your users may become frustrated when what they think is a link doesn’t work. Also, justified text can make your content harder to read, especially on small screens.

With that being said, let’s take a look at how to add underline and justify text buttons in WordPress. We’ll show you how to do this for the block and classic editor. We’ll also show you how to underline and justify text using keyboard shortcuts, without the need for a button.

Underlining and Justifying Text Using Keyboard Shortcuts

You don’t need a plugin or toolbar icons to underline or justify text in WordPress. Instead, you can simply use a keyboard shortcut.

To underline text, just select the text you want to underline in WordPress and press Ctrl+U on Windows or Command+U on Mac. That’s it. This keyboard shortcut will work with both the block and classic editor.

There’s another keyboard shortcut for justifying text. Simply select the text and press Shift+Alt+J in Windows or Command+Option+J on Mac and your text will be justified.

However, the keyboard combination for justifying text will only work with the classic editor. If you use the block editor, then you will not be able to justify text with a keyboard shortcut and should use the plugin method below.

Adding Underline and Justify Text Buttons to the Block Editor

First, you’ll need to install and activate the Gutenberg Block Editor Toolkit – EditorsKit plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will make underline, justify, and other formatting features available when using the WordPress block editor.

These additional icons can’t be added directly to the block editor’s toolbar, but you will find the extra options when clicking the ‘Displays more block tools’ down arrow on the toolbar.

Access Underline and Justify from the 'Displays More Block Tools' Icon

To underline text, you should first select the text, then click the ‘Displays more block tools’ down arrow, and then click on ‘Underline’ from the drop down menu.

To justify a paragraph, first make sure that your cursor is in that paragraph. Then click the ‘Displays more block tools’ down arrow and select ‘Justify’ from the drop down menu.

Adding Underline and Justify Text Buttons to the Classic Editor

If you are using the classic editor, then you should start by installing and activating the Advanced Editor Tools plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, you will need to navigate to Settings » Advanced Editor Tools (TinyMCE Advanced) in your admin menu. Next, you need to click on the ‘Classic Editor (TinyMCE)’ tab at the top of the page.

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

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

Drag the Unused Buttons You Need to the Classic Editor's Toolbar

When you have finished, make sure you click the ‘Save Changes’ button at the top of the screen to store the new settings.

Now when you are creating or editing a WordPress blog post or page, the new formatting buttons will be available on the classic editor’s toolbar.

Underline and Justify Buttons Are Now Available on the Classic Editor's Toolbar

We hope this tutorial helped you learn how to add underline and justify text buttons in WordPress. You may also want to learn why WordPress is free, or check out our list of must have plugins to grow your site.

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

The post How to Add Underline and Justify Text Buttons in WordPress first appeared on WPBeginner.

How To Efficiently Manage Post Series in WordPress

Featured Imgs 23

Are you looking for a better way to manage post series in WordPress?

If you’re working on an online novel or simply want to cover a broad industry topic, then creating a long post may not work for you. A post series allows you to dig deep into a particular topic and encourage readers to keep coming back for more.

In this article, we’ll show you how to efficiently manage post series in WordPress.

How To Efficiently Manage Post Series in WordPress

Why Publish Post Series in WordPress?

If you are writing about a complex topic on your WordPress website, then it is often better to write a series of posts that break the topic up into smaller chunks than to write one long post.

For example, our ultimate guide to speed up WordPress is a roundup of a series of posts we published on different ways to improve your site’s performance.

When you write a big series of posts like that, it can be tough to help your readers navigate the series and find all the information in the right order.

You could simply add a paragraph before each post telling your users that the post is part of a series and then list the rest of the posts at the bottom. But then you would have to manually update every post each time you publish a new article in the series.

Another solution would be to create a custom taxonomy called ‘Series’, but this also creates more work, such as creating or customizing template files.

Luckily, there is a WordPress plugin that will help you manage a series of articles. Let’s take a look at how to efficiently manage post series in WordPress.

How to Efficiently Manage Post Series in WordPress

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

There is a premium version with more features, but for this tutorial, we’ll use the free plugin.

As soon as the plugin is activated, you will be able to create new series and add posts to it.

Creating a New Series

To create your first series, you’ll need to head over to the Posts » Manage Series page. This looks similar to the page you see when adding new categories.

Once there, you will need to type a name, slug, and description for the series. When you’re finished, you’ll need to click the ‘Add New Series’ button at the bottom of the page.

Add a New Series in WordPress

You’ll notice that the new series is added to the list on the left.

Adding Posts to the Series

Now you can add some blog posts to the series. To start, simply create a new post or edit an old one.

In the settings panel on the right of the screen, you’ll notice a new section called ‘Series’. Simply click the button next to the series you created to add this post.

Add a New Post to Your Series

Make sure you click the ‘Publish’ or ‘Update’ button at the top of the page to push the post live as part of the series.

Next, you should add any other existing posts to the series. As you continue to write new articles, simply repeat this step to add them to the series.

Customizing the Order of Posts in the Series

By default, your articles will be displayed in the order you add them to the series. However, you can customize the post order by visiting the Posts » Publish Series page in your WordPress admin area.

Here you will see all the series you have created, with columns to show how many articles are published, unpublished, and scheduled in each. You will also see links to update the post order, publish or unpublish all, and view the series.

Click the 'Update Order' Link to Reorder Your Posts

To change the order of the posts, you will need to click the ‘Update order’ link. You will now see a list of all the posts in that series.

You can reorder the articles by dragging the post names up or down the list. When you move a post, the ‘Current Part’ number will be updated automatically to reflect the new order.

Drag and Drop Your Posts to Place Them in the Right Order

When you’re happy with the order of the posts, make sure you click the ‘Update Order’ button to store your settings.

Previewing Your Post Series

Now you can visit your WordPress blog to see how your new post series looks. Simply view a post that is part of the series.

At the top of the article, there will be a message that the post is part of a series. You will also see a list of all posts in the series and can easily navigate between them by clicking a link.

Post Order Preview

You will also find links at the bottom of the article to navigate to the next and previous article in the series.

We hope this tutorial helped you learn how to efficiently manage post series in WordPress. You may also want to learn how to track visitors to your WordPress site, or check out our list of must have plugins to grow your site.

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

The post How To Efficiently Manage Post Series in WordPress first appeared on WPBeginner.

How to Easily Add Custom Code in WordPress (Without Breaking Your Site)

Category Image 091

Often while reading WordPress tutorials, you may be asked to add custom code snippets in your theme’s functions.php file or in a site-specific plugin.

The problem is that even the slightest mistake can break your website.

In this article, we will show you an easy way to add custom code in WordPress without breaking your site.

How to easily add custom code in WordPress

The Problem with Custom Code Snippets (And How to Fix It)

Often you’ll find code snippets in WordPress tutorials with instructions to add them into your theme’s functions.php file or a site-specific plugin.

The biggest problem is that even a tiny mistake in the custom code snippet can break your WordPress site and make it inaccessible.

Not to mention, if you update your WordPress theme, then all your customizations get removed.

The other problem is that if you add multiple code snippets in a site-specific plugin, it can become hard to manage the file.

Luckily, there is an easier way for users to add and manage custom code snippets in WordPress.

WPCode is the most popular code snippets plugin used by over 1 million WordPress websites. It makes it easy to add code snippets in WordPress without having to edit your theme’s functions.php file.

WPCode Code Snippets Plugin

WPCode also makes it simple to add tracking codes for Google Analytics, Facebook Pixel, Google AdSense, and more to your site’s header and footer areas.

You’ll never have to worry about breaking your site because the smart code snippet validation helps you prevent common code errors.

In addition, WPCode comes with a built-in snippets library where you can find all of the most popular WordPress code snippets like disable REST API, disable comments, disable Gutenberg, allow SVG file uploads, and much more. This eliminates the need to install separate plugins for each feature request.

The best part is that you can manage all your code snippets from one central screen and add tags to organize them.

With that said, let’s take a look at how to easily add custom code snippets in WordPress with WPCode.

Adding Custom Code Snippets in WordPress

The first thing you need to do is install and activate the WPCode plugin on your website.

For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will add a new menu item labeled ‘Code Snippets’ to your WordPress admin bar. Clicking on it will show you a list of all the custom code snippets you have saved on your site.

Since you just installed the plugin, your list will be empty.

Go ahead and click on the ‘Add New’ button to add your first custom code snippet in WordPress.

Click 'Add New' in WPCode to create a new custom snippet

This will bring you to the ‘Add Snippet’ page. Here you can choose a code snippet from the pre-made library or add your custom code.

To add custom code, click on the ‘Use snippet’ button underneath the ‘Add Your Custom Code (New Snippet)’ option.

Add custom code in WPCode

You need to start by entering a title for your custom code snippet. This could be anything that helps you identify the code.

After that, you can copy and paste your code snippet into the code box. Be sure to also select the correct code type from the drop-down menu on the right.

Adding your first code snippet

In the screenshot above, we have added a custom code snippet to remove the WordPress version number from our test site.

function wpb_remove_version() {
return '';
}
add_filter('the_generator', 'wpb_remove_version');

Below the code box, you will see insertion options. There are two main insertion options: Auto Insert and Shortcode (Default).

Choose insertion option for code snippet

If you chose the ‘Auto Insert’ method, the snippet will be automatically inserted and executed on your site.

You can automatically run the snippet only in the WordPress admin area, on the front-end of your site, or everywhere. If you are unsure, then select the default ‘Run snippet everywhere’ option.

With the ‘Shortcode’ method, the snippet is not automatically inserted. Once you save the snippet, you’ll get a shortcode specific to the snippet that you can use anywhere on your site.

When you scroll further down, you will see a ‘Basic info’ area. You can add anything here that helps you understand what this code does, where you found it, and why you are adding it to your website.

Add code description and tags

You can also assign tags to your code snippet. This will help you sort your code snippets by topic and functionality.

The priority field allows you to control the order in which the snippets are executed when you want to display multiple snippets in the same location. By default, all snippets get a priority of 10. If you want a snippet to display earlier than others, simply set the snippet priority to a lower number, like 5.

Lastly, you can use the powerful ‘Smart Conditional Logic’ section to either show or hide auto-inserted snippets based on a set of rules.

Use smart conditional logic to show or hide snippets

For example, you can show code snippets to logged-in users only, load code snippets only on specific page URLs, and more.

When you’re finished choosing options, you can click the ‘Save Snippet’ button in the top-right corner of the screen and toggle the switch from ‘Inactive’ to ‘Active.’

Save and activate code snippet

If you want to save the code snippet and not activate it, then simply click on the ‘Save Snippet’ button.

Once you have saved and activated the code snippet, it will be added to your site automatically, if that’s the insertion method you chose, or displayed as a shortcode.

Handling Errors in Custom Code

Often, if you make a mistake in adding the custom code in your site-specific plugin or theme file, then it would immediately make your site inaccessible.

You would start seeing a syntax error or a 500 internal server error on your site. To fix this you’ll need to manually undo your code using an FTP client.

The neat part about the WPCode plugin is that it will automatically detect a syntax error in the code and immediately deactivate it.

Error handling in your custom code snippet

It will also show you a helpful error message, so you can debug the error.

WPCode’s smart code snippet validation will also detect any errors as you’re adding your custom code.

Smart code snippet validation to find code errors

Hovering over the error will bring up instructions to help you fix it.

Managing Your Custom Code Snippets

WPCode plugin provides an easy user interface to manage your custom code snippets in WordPress.

You can save code snippets without activating them on your site, and then activate or deactivate the snippet at any time you want. It’s also possible to filter code snippets by type and location, and use tags to organize your code snippets easily.

WPCode - WordPress Snippets Organized by Tags

You can also export specific code snippets or bulk export all of them.

Simply go to Code Snippets » Tools and click on the ‘Export’ tab.

Export your custom code snippets

If you’re moving websites to a different server, you can easily import your code snippets to the new site.

Just visit the Code Snippets » Tools » Import page and upload the export file.

Import code snippets with WPCode

We hope this article helped you learn how to easily add custom code in WordPress. Want to experiment with some code snippets on your website? Check out our list of extremely useful tricks for the WordPress functions file, and don’t forget to see our ultimate guide to speeding up your WordPress site.

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

The post How to Easily Add Custom Code in WordPress (Without Breaking Your Site) first appeared on WPBeginner.