Category Archives: WordPress Plugins

How to Easily Organize Media Uploads by Users in WordPress

Do you want to organize media uploads by user in WordPress?

If you run a multi-author website, then you may want to restrict each author’s media library access to only their own uploads. This can prevent an author from accidentally deleting another user’s images, and help keep subscriber-only content private.

In this article, we’ll show you how to organize media uploads by users in WordPress.

How to organize media uploads by users in WordPress

Why Restrict Author Access to Media Uploads?

If you have a multi-author WordPress blog, then people might be uploading lots of different images. This can make it difficult for an author to find the right image, or they might delete or edit another person’s media file by accident.

This can cause all sorts of problems including poor productivity, lots of extra work for site admins and editors, and a complicated editorial workflow.

This unlimited access can also be a privacy concern. For example, if you’re working on a new product or idea, then other authors might see confidential images in the media library before you make a public announcement.

If you have a WordPress membership site, then contributors and subscribers may be able to access premium media files they shouldn’t have access to. For example, if you sell online courses then a contributor might use their media library access to download premium PDFs and other course materials, without buying a subscription.

That being said, let’s take a look at how to restrict who can see media uploads inside your WordPress admin area. Simply use the quick links below to jump straight to the method you want to use.

Method 1. Organizing Media Uploads by Users With a Plugin (Quick and Easy)

The easiest way to restrict access to media uploads is by using the Frontier Restrict Access plugin.

This free plugin checks whether a user has the edit_others_posts permission, which allows them to edit another user’s posts.

By default, this ability is granted to everyone who has the site admin or editor role. If you want to change this, then you can add or remove capabilities to user roles in WordPress.

If the user doesn’t have this permission, then once this plugin is activated, they won’t be able to access another user’s files in the WordPress media library. This allows you to organize media uploads by users, without restricting access for admins and editors.

This plugin works out of the box and there are no settings for you to configure, so you can simply install and activate the Frontier Restrict Access plugin. For more details, see our guide on how to install a WordPress plugin.

Method 2. Organizing Media Uploads Using Code (Advanced)

Another option is to restrict access to files in the media library using code. This method requires you to add a code snippet to your WordPress blog or website, so it isn’t the most beginner-friendly method. However, you won’t need to install a separate plugin just to organize your media uploads.

Often, you’ll find guides with instructions to add custom code to your WordPress theme. However, this isn’t recommended as mistakes and typos in your code can cause common WordPress errors, or even break your site completely.

That’s why we recommend WPCode.

WPCode is the best code snippets plugin used by over 1 million WordPress websites. It makes it easy to add custom code in WordPress without having to edit the functions.php file.

For this method, we’ll be adding code that checks whether the user has the edit_others_posts permission. If they don’t have this permission, then the code snippet below will stop them from accessing other people’s files in the WordPress media library.

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

Upon activation, head over to Code Snippets » Add Snippet.

How to add custom PHP snippets to your site using WPCode

Here, simply hover your mouse over ‘Add Your Custom Code.’

When it appears, click on ‘Use snippet.’

Adding a custom code snippet to WordPress

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, open the ‘Code Type’ dropdown and select ‘PHP Snippet.’

Restricting access to the media library using WPCode

In the ‘Code Preview’ area, paste the following code snippet:

add_filter( 'ajax_query_attachments_args', 'user_show_attachments' );
 
function user_show_attachments( $query ) {
    $user_id = get_current_user_id();
    if ( $user_id && !current_user_can('activate_plugins') && !current_user_can('edit_others_posts
') ) {
        $query['author'] = $user_id;
    }
    return $query;
} 

Next, just scroll to the ‘Insertion’ section. WPCode can add your code to different locations, such as after every post, frontend only, or admin only.

We want to use the custom PHP code across our entire WordPress website, so click on ‘Auto Insert’ if it isn’t already selected. Then, open the ‘Location’ dropdown menu and choose ‘Run Everywhere.’

Running custom PHP code across your website using WPCode

After that, you’re ready to scroll to the top of the screen and click on the ‘Inactive’ toggle, so it changes to ‘Active.’

Finally, click on ‘Save Snippet’ to make the PHP snippet live.

How to restrict access to media files using code

Now, users will only have access to the files they upload to the WordPress media library.

We hope this article helped you better organize media uploads by users on your WordPress site. Next, you can check out our ultimate WordPress security guide or see our expert pick of the best contact form plugins for 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.

The post How to Easily Organize Media Uploads by Users in WordPress first appeared on WPBeginner.

How to Disable Emojis in WordPress (Step by Step)

Are you looking to disable emojis on your WordPress site?

Emojis are small icons that are used to express feelings or emotions. WordPress loads additional CSS and a JavaScript file to add emoji support and some users may want to remove it to improve performance and speed.

In this article, we’ll show you how to easily disable emojis in WordPress.

How to disable emojis in WordPress 4.2

What Are Emojis?

Emojis are the tiny icons or smileys used on the internet.

Originating from Japan, emojis have made their way into the Unicode character set and are now supported by desktop computers as well as iOS and Android mobile devices.

The emojis feature was first introduced in WordPress 4.2 and the primary reason for adding this feature was to add native support for Chinese, Japanese, and Korean language character sets.

Emojis example

By default, WordPress loads an additional JavaScript file and some CSS to add emoji support.

You can see it by viewing your website’s source code or by using the Inspect tool.

Emoji JavaScript in WordPress

However, some site owners may want to disable this extra emoji support to boost WordPress speed and performance by not downloading additional code and scripts.

Note: When we say disabling Emoji in WordPress, we mean disabling the extra checks and scripts used by WordPress to handle Emojis. You can still use Emoji on your site, and the browsers that support them will still be able to display them.

Having said that, let’s take a look at how to easily disable Emoji support in WordPress.

Method 1. Disabling Emojis in WordPress Using Code

For this method, we’ll be using a custom code snippet to disable emoji support in WordPress.

You can add this code snippet to your WordPress theme’ functions.php file or a site-specific plugin. However, a tiny error in the code could easily break your website and make it inaccessible.

To avoid this, we recommend using WPCode. It is the best code snippets plugin for WordPress and offers the safest way to add custom code to your site without breaking it.

First, you need to install and activate the WPCode plugin. For more instructions, see our guide on how to install a WordPress plugin.

After activation, simply go to the Code Snippets » All Snippets page from the WordPress admin dashboard.

From here, you need to click the ‘Add New’ button at the top.

Add new code snippet

This will take you to the ‘Add Snippet’ page.

From here, take your mouse over to the ‘Add Your Custom Code (New Snippet)’ option and then click the ‘Use snippet’ button.

Click Use Snippet button

This will bring you to the ‘Create Custom Snippet’ page. You can start by typing a name for your code snippet. It can be anything you like.

After that, you need to select ‘PHP Snippet’ as your ‘Code Type’ from the drop-down menu present in the right corner.

Type a name for your code snippet and choose PHP as code type

Now all you need to do is copy and paste the following code in the ‘Code Preview’ box.

/**
 * Disable the emoji's
 */
function disable_emojis() {
 remove_action( 'wp_head', 'print_emoji_detection_script', 7 );
 remove_action( 'admin_print_scripts', 'print_emoji_detection_script' );
 remove_action( 'wp_print_styles', 'print_emoji_styles' );
 remove_action( 'admin_print_styles', 'print_emoji_styles' ); 
 remove_filter( 'the_content_feed', 'wp_staticize_emoji' );
 remove_filter( 'comment_text_rss', 'wp_staticize_emoji' ); 
 remove_filter( 'wp_mail', 'wp_staticize_emoji_for_email' );
 add_filter( 'tiny_mce_plugins', 'disable_emojis_tinymce' );
 add_filter( 'wp_resource_hints', 'disable_emojis_remove_dns_prefetch', 10, 2 );
}
add_action( 'init', 'disable_emojis' );

/**
 * Filter function used to remove the tinymce emoji plugin.
 * 
 * @param array $plugins 
 * @return array Difference betwen the two arrays
 */
function disable_emojis_tinymce( $plugins ) {
 if ( is_array( $plugins ) ) {
 return array_diff( $plugins, array( 'wpemoji' ) );
 } else {
 return array();
 }
}

/**
 * Remove emoji CDN hostname from DNS prefetching hints.
 *
 * @param array $urls URLs to print for resource hints.
 * @param string $relation_type The relation type the URLs are printed for.
 * @return array Difference betwen the two arrays.
 */
function disable_emojis_remove_dns_prefetch( $urls, $relation_type ) {
 if ( 'dns-prefetch' == $relation_type ) {
 /** This filter is documented in wp-includes/formatting.php */
 $emoji_svg_url = apply_filters( 'emoji_svg_url', 'https://s.w.org/images/core/emoji/2/svg/' );

$urls = array_diff( $urls, array( $emoji_svg_url ) );
 }

return $urls;
}
Paste your code snippet

After that, scroll down to the ‘Insertion’ section to choose an insert method for your code.

Simply select the ‘Auto Insert’ mode so that the code can be automatically executed on your site upon activation.

Choose Auto Insert as insert method

Now go back to the top of the page and toggle the switch on the right from ‘Inactive’ to ‘Active’.

Finally, click the ‘Save Snippet’ button to save your custom code snippet.

Click the Save Snippet button to save changes

That’s all, you have successfully disabled emojis in WordPress.

Method 2. Disable Emojis in WordPress Using a Plugin

For this method, we’ll be using a plugin to disable Emojis in WordPress.

First, you need to install and activate the Disable Emojis plugin. See our guide on how to install a WordPress plugin for more instructions.

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

Upon activation, it will automatically disable emoji support from your WordPress site.

We hope this article helped you learn how to disable Emojis on your WordPress site. You may also want to check out our guide on how to create a custom Facebook feed in WordPress and our article on how to add web push notifications to 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 Disable Emojis in WordPress (Step by Step) first appeared on WPBeginner.

How to Create Compact Archives in WordPress

Do you want to create compact archives on your WordPress website?

If you have been blogging for a few years, then the list of your posts might have become too long to fit in your WordPress sidebar. This will make your sidebar look cluttered which won’t be good for your site presentation

In this article, we’ll show you how to easily create compact archives in WordPress.

How to create compact archives in WordPress

Why Do You Need Compact Archives in WordPress?

Adding an archive in WordPress allows you to easily display your previously published content on your website for users to go through.

By default, WordPress offers an ‘Archives’ block and widget that can be added to the sidebar of your WordPress blog.

However, the ‘Archives’ block only allows you to display your archives as a long list or a dropdown menu.

A list will make your site look cluttered while a dropdown can be easily overlooked by users as it isn’t as noticeable.

The default archive block in WordPress

By creating compact archives, you can easily display your archives in the WordPress sidebar without taking up much space. You can also display them on your about page or even create a dedicated Archives section.

That being said, let’s take a look at how to easily add compact archives in WordPress.

How to Add Compact Archives in WordPress

You can easily create compact archives in WordPress using the Compact Archives plugin.

First, you need to install and activate the Compact Archives plugin. For further instructions, check out our guide on how to install a WordPress plugin.

Now, the plugin offers three styles to display compact archives on your website.

Style 1. Relaxed three-letter month initials

Style one of the compact archives

Style 2. Compact Monthly Initials

Style two of compact archives

Style 3. Numeric Block

Style three of the compact archives

There are multiple ways to easily display compact archives on your website.

In this tutorial, we will be showing you all four methods and you can choose the one that you like the most.

Method 1. Add Compact Archives in WordPress Posts or Pages

It is super easy to add compact archives to your WordPress page or post because the plugin comes with an easy-to-use block that you can add to your post or page.

For this tutorial, we will be creating a new page for compact archives.

Simply head over to the Pages » Add New page from the admin sidebar. Once a new page opens up in the block editor, you can start by typing a name for your page.

Next, you need to click the ‘Add Block’ (+) button at the top and search for the ‘WPBeginner’s Compact Archvies’ block.

Upon locating it, simply click on the block to add it to your page.

Add the Compact archives block to a page

Next, you need to choose a style for your archives from the Block Settings panel on the right corner of the screen.

Simply choose a style of your liking from the dropdown menu below the ‘Select Archive Type’ option.

Select an archive type from the dropdown menu

You can also choose if you want your archive text to be capitalized or Uppercase.

For that, you need to open the dropdown menu below the ‘Transform Text’ option.

Select the archive text from the dropdown menu

Once you’re satisfied with your choice, simply click the ‘Publish’ or ‘Update’ button at the top.

This is how your archives page will look.

Archives preview

Method 2. Add Compact Archives as a Widget

You can also display your archive as a widget on your website.

Adding the Compact Archives Block in Full Site Editor

If you’re using a block-based theme on your website, then you’ll have to add the ‘ WPBeginners’ Compact Archives’ block using the full site editor.

First, you need to visit the Appearance » Editor page from the admin sidebar to launch the FSE.

From here, you need to click the ‘Add Block’ (+) button on the top-left corner of the screen to open up the block menu.

Next, you need to simply locate and add the ‘WPBeginner’s Compact Archvies’ block to your preferred place on the website.

Add the compact archives block in the FSE

Once you add the block, you can configure its’ style and text settings from the Block Settings panel on the right.

Finally, don’t forget to click on the ‘Save’ button at the top to store your settings.’

Configure the Compact archives settings in FSE

Your compact archives will look like this.

Compact archives in FSE

Adding the Compact Archives Block Using Widgets

If you’re not using a block-based theme, then this method is for you.

First, you need to visit the Appearance » Widgets page from the admin sidebar.

Once there, simply click the ‘Sidebar’ tab to expand it.

Now, you need to click the ‘Add Block’ (+) button in the sidebar tab.

This will open up the ‘Widget Block Menu’ where you need to search for the ‘WPBeginner’s Compact Archive’ block.

Upon locating it, simply click the block to add it in the sidebar section.

Add the compact archives block in the sidebar

Once the ‘Compact Archives’ block is added you can change the style and text of your archive by configuring the settings from the Block Settings panel on the right.

Don’t forget to click the ‘Update’ button at the top to save your changes.

Configure the block settings of the compact archives and click Update button

This is how your website sidebar will look upon adding the ‘Compact Archvies’ block.

Compact archive preview in sidebar

Method 3. Displaying Compact Archives in Template Files

If you are making a custom WordPress theme or want to display archives in a theme template file, Compact Archives comes with handy template tags that you can use.

Simply add the following template tag to your code.

<ul> <?php compact_archive(); ?> </ul>

After adding the tag, compact archives will be added to your page.

However, if you want to add a style to your archive, you can do so by adding the following template tag in your code.

<ul>
<?php compact_archive($style='initial', $before='<li>', $after='</li>'); ?>
</ul>

For example, $style == 'initial' will display only month name initials and should fit right inside a sidebar. Using$style == 'block', will fit the main column of a page. Using $style == 'numeric', will display numeric months.

Method 4. Add Compact Archives to Your HTML Sitemap

If you want to create an HTML sitemap page for your in WordPress, then you can also display compact archives on your HTML sitemap page.

First, you will need to install and activate the All in One SEO for WordPress plugin. For more details see our article on how to install a WordPress plugin.

All in One SEO is the best WordPress SEO plugin on the market. It allows you to easily optimize your website for search engines.

It also comes with an HTML sitemap feature that allows you to easily add an HTML sitemap to your WordPress site.

It is a premium plugin but you can also use the free version called All in One SEO Lite. The free version has fewer features but it includes HTML sitemaps.

Upon activation, the plugin will launch the setup wizard. Simply follow the on-screen instructions to set up the plugin or see our guide on how to properly set up All in One SEO for WordPress.

Once finished, you now need to visit the All in One SEO » Sitemaps page from the admin sidebar.

From here, you need to click on the ‘HTML Sitemap’ tab and make sure that the ‘Enable Sitemap’ toggle is turned on.

Toggle the Enable Sitemap switch

Next, you need to choose how you want to display your HTML sitemap.

For this tutorial, we will be choosing the ‘Gutenberg Block’ option.

If you choose this method, then you’ll have to add the “AIOSEO – HTML Sitemap” block to any page where you wish to display your HTML sitemap.

Choose the Gutenberg block

Next, you need to scroll down to the ‘Compact Archives’ option in the ‘HTML Sitemap Settings’ section.

Here, you need to simply toggle the ‘Compact Archives’ switch to ‘Enabled’.

Now your HTML sitemap will be displayed in a compact date archive format.

Toggle the compact archives switch to Enabled

Finally, don’t forget to click on the ‘Save Changes’ button to store your settings.

Next, open up a page where you want to display the HTML sitemap from the admin sidebar.

From here, simply click on the ‘Add Block’ (+) button at the top and then add the ‘AIOSEO-HTML Sitemap’ block to your page.

Add the AIOSEO-HTML Sitemap block to your page

Finally, don’t forget to click the ‘Publish’ or ‘Update’ button to save your changes.

Your compact archives HTML Sitemap will look like this.

We hope this article helped you learn how to easily create compact archives in WordPress. You may also want to see our guide on how to easily create an email newsletter in WordPress and our top picks of the best social media plugins to help promote your website.

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

The post How to Create Compact Archives in WordPress first appeared on WPBeginner.

How to Enable / Activate WordPress Plugins from the Database

Are you looking to enable or activate plugins from the WordPress database?

If you are unable to access your WordPress admin area and need to activate a plugin to restore your access, then you can do that from the WordPress database.

In this article, we will show you how to easily activate your WordPress plugins using the database.

How to enable/activate WordPress plugins from the database

When Should You Activate WordPress Plugins Using Database

A number of common WordPress errors can prevent a website owner from accessing the WordPress admin area. In most of those situations, the user is looking to deactivate WordPress plugins without admin access.

However in some situations, a website owner may need to activate certain plugins to restore access to their WordPress website.

For example, let’s assume an error is stopping you from accessing your WordPress dashboard, and you have found a plugin that can fix that error.

Luckily, WordPress stores the active plugins information in your WordPress database. This means you can manually enter this information directly in the database and tell WordPress to activate a plugin.

The only condition is that the plugin must be installed on your WordPress site. Which means that it should be present in the plugins folder on your WordPress website.

With that being said, let’s see how you can easily enable/activate a plugin using the database.

Step 1. Find Your Database Name Using the Hosting Control Panel

To activate your WordPress plugins using phpMyAdmin, first, you need to find out your WordPress database’s name.

Now, to find the name of your database, you need to log in to your web hosting dashboard. For this tutorial, we will be using Bluehost.

If you are using a different hosting company, then your WordPress hosting dashboard may look slightly different.

Once you are on the cPanel, scroll down to the ‘Files’ section and click the ‘File Manager’ option.

Click at the file manager

This will open up the File Manager in a new window. Here you simply need to locate and click the public_html folder from the left column.

This will open up all the files that are stored in the public_html folder. Now, you simply need to locate and click the folder with your site’s name on it present under the ‘Name’ column.

Go to the publich_html file and find your site name

Some users may instead see their WordPress files and folders installed inside public_html folder.

After you have opened up your WordPress site’s file, locate the wp-config.php file under the ‘Name’ section and right-click on it.

This will open up a menu where you need to select the ‘View’ option.

Click View

This will open up the wp-config.php file in a new window where you can locate your database details.

We recommend that you copy and paste your database details including username and password into a notepad on your computer.

Database details

Now you’ve successfully found your database’s name, let’s move to our next step.

Step 2. Locate Active Plugins Option via PhpMyAdmin

After you have found out the name of your database, you need to go back to your WordPress hosting control panel.

Once there, scroll down to the ‘Databases’ section and click the ‘phpMyAdmin’ option.

Click the phpMyAdmin option in the cPanel

This will launch the phpMyAdmin app in a new browser tab.

Note: Before you make any kind of changes, please make sure to create a complete backup of your database. It will come in handy if anything goes wrong with the process.

Next, you simply need to click the ‘Database’ tab from the navigation menu present at the top of the page.

Now, simply locate your WordPress database and click on the browse button to expand it.

Click the Database tab from the navigation menu

This will show your WordPress database tables.

Here, you will simply need to locate wp_options table and click browse next to it.

Note: By default, WordPress uses wp_ as the prefix for table names. Your WordPress database table may have a different table prefix.

Click at wp-options

Inside the wp_options table, you’ll need to find the row where option_name is set toactive_plugins.

After that, click on the Edit link next to it.

Click the Activate_Plugins option

This will open up a box where you can manually enter details to activate a plugin.

Step 3. Activate a Plugin Using phpMyAdmin

WordPress stores the active plugins information in a special format so that it can be programatically accessed by the software.

In order to tell WordPress which plugins to activate, we’ll need to use that same format.

First, we’ll start by entering the option_value as a:1: and then open up the curly bracket ({).

We are entering this value as 1 because we only want to activate one plugin. You have to change the value to the number of plugins you plan on activating.

Add option value

Next, we will be entering i:0; after the curly bracket. Here we are essentially assigning a serial number to our plugin.

Remember to always assign numbers starting from 0 instead of 1.

Add serial number

Next, we will be entering the number of characters present in the plugin’s name and the php file name of the plugin that we’re about to activate.

For that, we will type s:24: in the box. Keep in mind that the number of characters will differ for each plugin based on the characters in the plugin directory and file name.

For instance, we are activating WPForms in this tutorial which has 24 characters in its name including the file name of the plugin as stored in our file manager.

Add character number

Next, you just need to type the plugin’s directory name. You can find it by visiting the /wp-content/plugins/ folder using the File Manager app.

Don’t forget to add quotation marks before typing the plugin’s directory name.

Type the plugins' name

After the /, you need to enter the plugin’s file name. This is usually the file with similar name inside the plugin folder.

Plugin file and folder name

Now, go back to phpMyAdmin and type the name of the plugin and then close the quotation marks.

After that, simply add a semi-colon (;) and close the curly brackets (}). The final value in this example would look like this:

a:1:{i:0;s:24:"wpforms-lite/wpforms.php";}

This is how it will look once you’re done.

Activating a single plugin

Next, simply click the ‘Go’ button to execute the command.

Now go visit your WordPress dashboard and head over to Plugins » Installed Plugins.

Your plugin has been successfully activated.

activated-plugin

Now let’s say you want to activate two more plugins.

First you will need to change the number of plugins. After you will adjust each entry for the plugin that you want to activate.

Here is an example:

a:3:{
i:0;s:47:"all-in-one-seo-pack-pro/all_in_one_seo_pack.php";
i:1;s:35:"insert-headers-and-footers/ihaf.php";
i:2;s:24:"wpforms-lite/wpforms.php";
}

Note: We have added line breaks here to make the code look more readable. You need to make sure that there are no line breaks or spaces in your code. Otherwise, it wouldn’t work.

We hope you learned how to activate a plugin using the database. You may also want to see our guide on how to add social media feeds to WordPress, and our comparison of the best domain registrars in the world.

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 Enable / Activate WordPress Plugins from the Database first appeared on WPBeginner.

How to Use the SEO Writing Assistant in WordPress to Improve SEO

Many of our readers ask us how to write better content for SEO. Some ask whether or not they should focus on Yoast SEO’s green light.

Well, when it comes to SEO content optimization, we use a different SEO writing assistant. It helps us optimize our content for SEO, so we can rank higher in search engines.

In this article, we will show you how to use the SEO Writing Assistant in WordPress to improve SEO and create better content for your website.

How to Use the SEO Writing Assistant in WordPress to Improve SEO

What is SEO Writing Assistant?

The SEO Writing Assistant is a content optimization tool created by Semrush, one of the best SEO tools on the market. It allows you to check your content in real-time for SEO suggestions and improve the overall SEO score of the content on your WordPress website.

Here is how it works:

  • You enter your focus keywords to generate content templates based on the top 10 results for that phrase.
  • You instantly get semantically-related keywords to include in your article.
  • You improve your content with a readability score based on rival results.
  • You optimize your article headline for SEO.
  • You adjust the article length based on the average length of top results.
  • You check for plagiarism without leaving your website.
  • You check the content’s tone to make it sure sounds natural and casual.

It is an extremely useful tool and can help you improve the SEO as well as writing style across your website. If you manage a multi-author site, then it allows authors to follow the same SEO best practices across all content.

Having said that, let’s take a look at how to use the SEO Writing Assistant to improve your SEO and get more search traffic to your website.

Setting Up Semrush’s SEO Writing Assistant in WordPress

The first thing you need to do is visit the Semrush SEO Writing Assistant website and click on ‘Create new template’ button.

Semrush Analyze My Text

You will be now asked to log in or create a free account.

Semrush offers a basic free account with just 1 free content recommendation.

You will need to sign up for or upgrade to a paid Semrush subscription to get all features. This is totally worth it, and a free 7-day trial is available for paid plans.

Create a Free Semrush Account

Once you log in, you will be able to use the SEO Writing Assistant from Semrush’s website.

You can type your content or import it from the web, provide target keywords, and select the language and location of your target audience.

Using Writing Assistant From the Semrush Website

When you press the ‘Get recommendations’ button, Semrush will analyze the content and make suggestions.

However, you can also use the SEO Writing Assistant inside your WordPress dashboard. You simply need to connect the SEO Writing Assistant tool to your WordPress site.

First, you’ll need to install and activate the Semrush SEO Writing Assistant plugin. For more details, see our step-by-step guide on how to install a WordPress plugin.

Upon activation, you need to edit an article that you want to optimize for SEO. On the post edit screen, scroll down until you see the new ‘Semrush SEO Writing Assistant’ section below the content editor.

Using the SEO Writing Assistant in the WordPress Content Editor

It will show you basic readability and SEO score. To get the full picture, you need to click the ‘Log in’ link and sign in to your Semrush account.

Once signed in, you’ll be asked to give permission. Click the ‘Approve’ button to continue.

Give Permission for WordPress to Use Your Semrush Login

Now that you have connected the plugin to your Semrush account, you can generate SEO recommendations for our article.

You can enter your target keywords by typing them into the ‘Keywords’ field or by clicking the ‘Extract from text’ button. If you need help finding the right keywords, then see our beginner’s guide on how to do keyword research for your WordPress site.

Using the SEO Writing Assistant in WordPress

After that, you should click the ‘Get recommendations’ button and Semrush will analyze your content.

It will start by giving the post an overall score.

SEO Writing Assistant Switch Layout

By default, the following sections offer simple summaries. You can switch to a more detailed report by clicking the hamburger icon at the top right of the Semrush SEO Writing Assistant, and then selecting ‘Switch layout’ from the menu.

Checking Target Keywords Using Semrush SEO Writing Assistant

You can now scroll down to the SEO report. Semrush will check the top 10 results for the given keywords to generate a list of semantically related keywords that you can include in your content.

SEO Writing Assistant SEO Keyword Details

Keywords already included in your article will appear with a green background. You can go ahead and start adding missing keywords to your existing content where applicable or expanding your content to add new sections when necessary.

As you write, the tool will also adjust the readability and article length scores to match the average scores of top results.

Checking Tone of Voice Using Semrush SEO Writing Assistant

All SEO experts and marketers advise using a casual tone for all your articles. Search engines consider this conversational tone to be more engaging and useful for most audiences.

Now the problem is that sometimes it becomes harder to maintain a casual tone throughout the article.

SEO Writing Assistant comes with a ‘Tone of Voice’ checker. This AI-powered tool checks your content’s tone and gives it a score ranging from formal to casual.

SEO Writing Assistant Tone of Voice Details

Most articles fall somewhere in between, so don’t worry if it says your article has a neutral tone.

You will also see a list of your most casual sentences. You can consider rewriting these so they are less casual.

Links play a crucial role in SEO and the SEO Writing Assistant helps you keep track of links inside your article.

It will let you know if your article does not have an optimal number of internal links. It will also check for external links and links to your homepage.

SEO Reporting Assistant Reports Issues With Links

This tool comes in handy if you have other authors working on articles. Editors can quickly see if the article includes internal links to other posts on your website.

Checking Plagiarism in WordPress with SEO Writing Assistant

If you are hiring writers to contribute articles to your blog, then you’ll need to make sure that the articles they are submitting are original content.

Normally, editors and website owners use plagiarism checkers like Grammarly, CopyScape, or Google to see if an article is original.

The SEO Writing Assistant makes this easier with a built-in Plagiarism Checker tool.

Using the SEO Writing Assistant Plagiarism Checker

The downside is that even with the paid plans, you can only perform a limited number of checks.

If you need more, then you can buy additional checks from your subscription page on the Semrush dashboard.

Getting a Perfect SEO Score for Your Article

As you implement suggestions provided by the SEO Writing Assistant tool, your overall score will improve as well.

SEO Writing Assistant Overall Score

The overall score bar takes into account all the parameters and suggestions shown by the plugin. You need to make sure that each line on the chart turns green for better SEO rankings.

However, sometimes the plugin may suggest LSI keywords that may not fit in your content. You can safely ignore them instead of stuffing them into your article.

Remember that while these SEO tools provide recommendations, you know your audience better than these tools ever can. Keep your users in mind and make sure that they find your content useful and engaging.

Tracking Your SEO Performance in WordPress

Once you have started using SEO Writing Assistant for a while, you may want to track how it is affecting your website’s positions in search.

We have a detailed guide on how to track your website’s keyword rankings with Semrush and other tools.

You may also want to keep an eye on your top content using Google Analytics. The best way to do this is by using MonsterInsights. It brings your Google Analytics reports into WordPress and displays them in a human-readable format.

We hope this article helped you learn how to use SEO Writing Assistant in WordPress to improve SEO. You may also want to learn how to create automated workflows in WordPress, or see our list of the best social media 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 Use the SEO Writing Assistant in WordPress to Improve SEO first appeared on WPBeginner.

YaySMTP Review: Get More Emails into Your Customers’ Inbox

Are you tired of your WordPress site’s automated emails ending up in users’ spam folders or not being delivered at all? Have you experienced issues with sending and receiving emails from your site? If so, you’re not alone. Many website owners struggle with these problems, which can be frustrating and time-consuming to resolve. But what [...]

Read More...

The post YaySMTP Review: Get More Emails into Your Customers’ Inbox appeared first on Learn WordPress with WPLift.

How to Properly Disable Lazy Load in WordPress (Step by Step)

Do you want to disable lazy loading in WordPress?

By default, WordPress comes with a lazy load feature, which delays downloads for images and other media to improve page load speed.

However, for some websites, it may affect user experience by not displaying images and media right away.

In this article, we’ll show you how to easily disable lazy load in WordPress both using a code method as well as a plugin method.

How to properly disable lazy load in WordPress

What is Lazy Loading?

WordPress first introduced lazy loading images in WordPress 5.5. Later it extended the lazy load feature to iframes embeds (e.g. YouTube videos, Spotify, and other embeds).

This practice helps improve your website’s speed and performance by quickly loading content and the visible area first.

A faster website is not just good for users, but it is also good for SEO. Search engines like Google consider speed as an important ranking factor.

Apart from images and embeds, you can also easily lazy load comments and Gravatars to further improve page load speed.

Lazy loading can be seen in action by right-clicking on an image and selecting the Inspect tool in your browser.

Lazy loading images in WordPress

This will split your browser screen and show you the HTML source code. From here, you’ll be able to see the “loading=lazy” attribute added to the image.

Now normally, we don’t recommend disabling lazy load due to its overall benefits for your WordPress website. Turning it off can result in slower website speed, lower conversion rates, and lower SEO rankings.

However, sometimes lazy loading can affect the user experience for some websites.

For instance, if you run a photography website where images are the most significant aspect of your content, then lazy loading them may ruin the user experience for your customers.

In other cases, you might be using a different lazy loading solution and just want to turn off the default WordPress lazy load.

That being said, let’s see how you can easily disable lazy load in WordPress.

You can simply disable the lazy load feature in WordPress by adding a custom code snippet to your theme’s functions.php file.

However, keep in mind that the smallest error while adding the code can result in breaking your website and making it inaccessible to your users.

This is why we recommend using the WPCode plugin to add custom code to your site.

It is the best custom code snippets plugin that makes it super easy for beginners to safely add custom code to their website.

First, you need to install and activate the WPCode plugin. See our guide on how to install a WordPress plugin for more instructions.

Upon activation, go to the Code Snippets » + Add Snippet page.

Add new snippet

This will take you to the ‘Add Snippets’ screen where you’ll see a bunch of ready-to-use code snippets that you can add to your website.

From here, you need to click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

Once you’re on the ‘Create Custom Snippet’ page, you can start by typing a name for your code snippet.

It can be anything that will help you identify the code snippet and what it does.

Snippet title and type

After that, select ‘PHP Snippet’ from the dropdown menu next to the ‘Code Type’ option.

Now, copy and paste the following PHP code in the ‘Code Preview’ box.

add_filter( 'wp_lazy_loading_enabled', '__return_false' );

This is how the code will look after it is pasted in the ‘Code Preview’ box.

Add code snippet

After adding the code, scroll down to the ‘Insertion’ section.

Here, simply choose ‘Auto Insert’ as the insertion mode. This will ensure that your custom code is automatically executed everywhere on your website once you activate the snippet.

Choose an insertion method

Next, you need to scroll to the top of the page and simply toggle the ‘Inactive’ switch to ‘Active’.

After that, don’t forget to click the ‘Save Snippet’ button to save and execute your custom snippet.

Save your code snippet

Once activated, this custom code snippet will disable the lazy loading feature on your WordPress website.

You can test by right-clicking on an image and selecting Inspect from the browser menu.

In the HTML code for the image, the loading=lazy attribute will now disappear.

Lazy loading disabled

Method 2. Disable Lazy Load in WordPress Using a Plugin

If you don’t want to add code to your site, then you can use the Disable Lazy Load plugin.

The only thing you need to do is install and activate the Disable Lazy Load plugin. For more instructions, check our guide on how to install a WordPress plugin.

Activate plugin to disable lazy load

The plugin works out of the box and does not require any configuration. Once activated, it will automatically disable the lazy load feature on your site.

We hope this article helped you learn how to properly disable lazy load in WordPress. You may also want to see our guide on how to optimize WordPress images for better page load times, or see our pick of the best WordPress image compression 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 Disable Lazy Load in WordPress (Step by Step) first appeared on WPBeginner.

9 Best YouTube Video Gallery Plugins for WordPress

Do you want to add a YouTube video gallery on your WordPress website?

You can add YouTube videos to WordPress blog posts using the built-in Embed block. However, you can’t easily arrange these videos in a nice gallery layout.

In this article, we will share the best YouTube video gallery plugins for WordPress so you can show your videos in an organized and eye-catching way.

Best YouTube video gallery plugins for WordPress

1. Smash Balloon YouTube Feed Pro

The Smash Balloon YouTube gallery plugin

Smash Balloon YouTube Feed Pro is the best YouTube gallery plugin on the market.

This plugin allows you to hand-pick specific videos from your account, or automatically show all the latest videos from your YouTube channel. You can even combine multiple YouTube channels into a single feed.

A YouTube gallery, created using Smash Balloon

Smash Balloon has a ready-made gallery layout so you can organize your videos with the click of a button. After creating a gallery, you can control exactly how the videos look by choosing whether to show the YouTube description, title, comments, the total number of likes, and much more.

You can even encourage visitors to join your YouTube channel, by adding a ‘Subscribe’ button to the gallery.

By default, the gallery layout also has a ‘Load More’ button so visitors can scroll through your entire YouTube channel without leaving your website.

Customizing the YouTube gallery 'Load More' button

When a visitor clicks on a video, Smash Balloon will start playing it in an embedded video player. In this way, you can get more YouTube views and engagement without driving visitors away from your website.

By default, the player shows related videos when the playback finishes, or the visitor pauses the video. Smash Balloon lets you replace these suggested videos with a custom call to action, so you can promote a specific post, page, or even the most popular WooCommerce products from your online store.

You can also use Smash Balloon to embed YouTube playlists, favorites, and livestreams on your WordPress website.

The best part 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.

The other nice thing about Smash Balloon is that you can combine social content from Instagram, Facebook, Twitter, and YouTube into a single social wall. If you’re serious about growing your online presence, then we highly recommend the Smash Balloon All Access Bundle, which gives you access to the social wall feature.

A social wall, created using Smash Balloon

Note: If you’re just getting started or have a limited budget, then there’s also a free version of the YouTube feed plugin. Although this plugin is missing the more advanced features, it still has everything you need to embed YouTube videos on your WordPress website.

Pricing: Smash Balloon YouTube Feed Pro licenses start at $49 per year. If you want to embed Facebook, Twitter, Instagram, and YouTube content on your WordPress website, then you can grab the All Access Bundle for $299 per year.

2. Envira Gallery

The Envira Gallery YouTube plugin

Envira Gallery is generally known as the best WordPress photo gallery plugin.

However, there’s also an Envira Gallery Videos Addon that allows you to create a YouTube gallery. Simply enter the URL for each YouTube video and then specify the thumbnail that you want to show in the gallery. The Videos Addon will then fetch the video automatically.

After adding all your videos, Envira Gallery lets you fine-tune the playback experience. You can make the video autoplay, open it fullscreen by default, hide the playback controls, and much more.

Envira Gallery can also embed entire YouTube playlists, although you’ll need to get a YouTube API from the Google Cloud Console and then add it to the plugin’s settings first.

As well as YouTube, Envira Gallery supports other popular video hosting services such as Vimeo, Wistia, Twitch, VideoPress, and Dailymotion.

You can also embed Facebook videos in WordPress.

One major drawback is that Envira Gallery won’t automatically fetch new YouTube videos from your channel. If you want to update the gallery, then you’ll need to add each new video manually using its URL.

Pricing: To get Envira with the Video Gallery addon, you’ll need to either buy a Pro license ($89 per year) or a Lifetime license ($209).

3. YouTube Showcase

The YouTube Showcase gallery plugin

With the YouTube Showcase plugin, you can add a YouTube video gallery or grid to your WordPress website.

After activating the plugin, you can add any YouTube video to your site using the 11-digit alphanumeric video key shown at the end of the video’s URL.

To help visitors find what they’re looking for, YouTube Showcase lets you add categories and tags to your videos. These work in exactly the same way as the built-in WordPress categories and tags, so they’re very easy to use.

Once you’ve done that, you just need to add the plugin’s shortcode to any page, post, or widget-ready area. YouTube Showcase will then show all your videos in a nice gallery layout.

YouTube Showcase automatically adds a row of video thumbnails below the gallery, so visitors can easily move between the different videos. For visitors who are using a smartphone or tablet, YouTube Showcase replaces these thumbnails with more mobile-friendly ‘Prev’ and ‘Next’ icons.

The plugin uses pagination by default, so your gallery should load quickly no matter how many videos you add.

The default gallery layout should be a good fit for most websites. However, if you want to make changes then the plugin has a straightforward settings page.

While it isn’t as customizable as some of the other gallery plugins, YouTube Showcase does have a section where more advanced users can add custom CSS and custom JavaScript.

If you don’t like the gallery layout, then YouTube Showcase also has a video grid shortcode. This shows all your YouTube videos in a 4-column grid layout.

Pricing: You can download YouTube Showcase for free from the official WordPress repository.

4. YourChannel

The YourChannel WordPress gallery plugin for YouTube

YourChannel is one of the easiest ways to create a YouTube gallery. It allows visitors to look through your entire YouTube channel feed and watch any video without leaving your website.

YourChannel also comes with a built-in WordPress caching system, to help keep your website running smoothly.

To set up YourChannel, simply enter your YouTube username or channel ID. After that, the plugin will automatically fetch banner images, video thumbnails, your subscriber count, and your total number of views.

The plugin’s settings are straightforward and user-friendly, so you can create a beautiful-looking gallery simply by checking a few boxes and typing some numbers.

You can change how many videos YourChannel shows when the gallery page first loads, and set a maximum number of videos that visitors can scroll through. This is particularly useful for creating a mobile-friendly video gallery.

YourChannel also helps you stay GDPR compliant by showing an ‘Allow Cookies’ message when a visitor first clicks the ‘Play’ button. This message includes a link to your privacy policy.

When you’re happy with how the gallery looks, you can add it to any page, post, or widget-ready area using a shortcode provided by the plugin.

Pricing: Simply visit the WordPress repository and download the YourChannel plugin for free.

5. Photo Gallery by 10Web

The Photo Gallery for 10Web plugin for WordPress

According to our marketing statistics research, 70% of people visit YouTube on a smartphone or tablet. If you run an online store using a plugin such as WooCommerce, then you’ll be interested to learn that 90% of consumers watch videos on a mobile device.

With that in mind, you’ll want to make sure your YouTube gallery looks just as good on mobile, as it does on desktop. With Photo Gallery by 10Web, you can create a mobile responsive image and video gallery within minutes.

Despite the name, Photo Gallery supports all the best video hosting sites including Vimeo, Dailymotion, and YouTube. Simply copy the video’s URL, and Photo Gallery will add that video to your website.

After that, you can fine-tune how the gallery looks by choosing different layouts, switching between dark and light themes, adding pagination, and more. You’ll also have complete control over the content that appears in your gallery, including adding or removing the video title, description, tag box, and more.

Visitors can watch each video directly on your website, using the Photo Gallery lightbox popup. The lightbox comes with built-in social share buttons, which make it easy for visitors to share your videos on Facebook and Twitter. This can help you create a buzz on social media, get more engagement, and grow your social media following.

Pricing: You can download Photo Gallery for free from the official WordPress repository. If you need more advanced features, then there’s also a premium version of Photo Gallery.

6. Embed Plus for YouTube

The EmbedPlus gallery plugin for YouTube

Embed Plus for YouTube allows you to create a YouTube gallery using videos, playlists, shorts, and livestreams.

This plugin has a few unusual features, such as ‘Modest Branding’ which reduces the amount of YouTube branding in your video gallery.

Another unique feature is ‘facade mode,’ which aims to make your WordPress website faster by loading a lighter version of the video player initially, and then downloading the rest of the player when the visitor clicks a video.

To make your pages load even faster, Embed Plus can defer JavaScript while serving minified CSS and JavaScript.

Embed Plus can even convert non-HTTPs videos to HTTPS. Since Google uses HTTPS/SSL as a ranking factor in its search results, this can improve your search engine rankings.

For more on this topic, please see our complete guide on how to move WordPress from HTTP to HTTPS.

To keep people on your website for longer, Embed Plus can automatically play the next video in the gallery, which is particularly useful if you’re adding playlists to your WordPress blog.

This plugin has in-depth and detailed settings that cover several tabs. This gives you complete control over how the YouTube gallery looks and acts, but it can be confusing when you first activate the plugin.

Thankfully, Embed Plus has a built-in setup wizard that asks questions about the kind of gallery you want to create and then changes the default settings based on your answers.

Pricing: You can download Embed Plus YouTube for free from the official WordPress repository. If you need more advanced features then there’s also a Pro YouTube plugin.

7. Automatic YouTube Gallery

The Automatic YouTube Gallery plugin for WordPress

Automatic YouTube Gallery lets you create unlimited video galleries on your site. As the name suggests, this plugin automates most of the setup process so you can create a YouTube video gallery in minutes.

With this plugin, you can create a YouTube gallery using a channel ID, username, playlist, search terms, or even by entering specific video URLs. You can also embed live streams on your WordPress website.

After choosing your videos, Automatic YouTube Gallery lets you fine-tune how the gallery looks. This includes changing the number of columns in the gallery layout, changing the ratio, adding or removing the video titles, and more.

Automatic YouTube Gallery also has some settings to help keep visitors on your website for longer, such as autoplaying the next video and looping a single video. To make your YouTube gallery more accessible, you can also activate closed captions by default or change the language used by the video player’s interface.

With Automatic YouTube Gallery, you don’t have to worry about videos slowing down your site. The plugin has a caching feature that can reduce page loading times and boost your WordPress speed and performance.

This plugin is also fully compatible with WordPress multisite.

Pricing: You can download the Automatic YouTube Gallery plugin for free from the official WordPress repository.

8. All-in-One Video Gallery

The All in One Video Gallery WordPress plugin

You can use All-in-One Video Gallery to show videos from YouTube, Vimeo, Dailymotion, Rumble, and more in an HTML5 video player.

Unlike other plugins that have their own editors, All-in-One Video Gallery integrates with the familiar WordPress page and post editor. It also has video categories and tags that work exactly the same as the built-in WordPress categories and tags.

With this in mind, it’s very easy to get started with the All-in-One Video Gallery.

After adding your videos, All-in-One Video Gallery lets you customize the player controls, playback options, and video quality levels. This plugin also aims to make your videos more accessible by supporting WebVTT subtitles and showing the subtitles automatically.

The plugin is GDPR compliant and will get the visitor’s consent before loading YouTube, Vimeo, or embedded videos from third-party websites. If you prefer, then you can also disable the plugin’s cookies for added privacy.

When you’re ready, you can either show all your videos in a single gallery or create different galleries using the plugin’s categories feature. This allows you to create lots of different galleries, with different content.

Another option is embedding the built-in All-in-One Video Gallery search form. This allows visitors to search through all your videos, to find exactly the content they’re looking for.

Pricing: You can download All-in-One Video Gallery for free from the WordPress repository.

9. Video Gallery – Total Soft

The Video Gallery WordPress plugin

Video Gallery by Total Soft can add an unlimited number of professionally-designed video galleries to your website. This plugin supports YouTube plus other major video platforms such as Vimeo and Wistia.

When building a gallery, you can choose between 16 different themes and 9 layouts. If your YouTube channel has lots of videos, then you can use pagination to spread the content across multiple pages.

This plugin puts a strong focus on gallery thumbnails. Every time you add a video to a gallery, you can replace the default YouTube thumbnail with an image of your choice.

After that, Video Gallery will play different hover effects when the visitor moves their mouse over the thumbnail. This includes some advanced hover effects that animate the video’s title, description, and other elements. In this way, your gallery can catch the visitor’s attention before it starts playing videos.

Video Gallery allows you to show videos from different online platforms, and even self-hosted videos, in the same gallery.

After building a gallery, you can add it to any page, post, or widget-ready area using a shortcode. Video Gallery also provides a code snippet that adds the gallery to your WordPress theme. For more information, please see our guide on how to easily add custom code in WordPress.

Pricing: You can download Video Gallery for free from the official WordPress repository.

What is the Best YouTube Video Gallery Plugin for WordPress?

If you’re looking for the easiest way to add a gallery to WordPress, then Smash Balloon Youtube Feed Pro is our top pick.

This plugin guides you through the process of connecting YouTube and WordPress and then makes it easy to build a professionally-designed gallery. It also lets you fine-tune every part of the gallery so it perfectly suits your WordPress theme.

When you’re happy with how the gallery looks, you can add it to any page, post, or widget-ready area using either a shortcode or the plugin’s Feeds for YouTube block.

Unlike some other plugins on the list, your Smash Balloon gallery will update automatically as you publish new videos to YouTube. This means visitors will always see the latest videos, and you don’t have to worry about updating your gallery manually.

While Smash Balloon YouTube Feed Pro is our top choice, it is a premium plugin. If you’re looking for a free YouTube gallery plugin, then you may want to take a look at Feeds for YouTube instead.

While this plugin is missing some of Smash Balloon’s advanced features, it still has everything you need to create a YouTube video gallery for your WordPress website.

This makes Feeds for YouTube our top pick for anyone who is just getting started, has a limited budget, or just wants to embed a small number of videos in their WordPress website.

We hope this article helped you choose the best YouTube gallery plugins for WordPress. You may also want to see our list of best drag-and-drop WordPress page builders to create custom designs and our tutorial on how to create an email newsletter to keep your visitors updated with your new videos.

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

The post 9 Best YouTube Video Gallery Plugins for WordPress first appeared on WPBeginner.

How to Add a PDF Viewer in WordPress

Do you want to add a PDF viewer in WordPress?

By embedding PDF files in your website, you can make sure those files always have the same layout, no matter what device the visitor is using. These files can also keep people on your website for longer and add value for your uses.

In this article, we will show you how to add a PDF viewer in WordPress.

How to add a PDF viewer in WordPress

Why Do You Need a PDF Viewer in WordPress?

Many websites use PDF files to share information about their services and products. For example, restaurant owners often publish their menu as an online PDF.

You can always upload a PDF to your website and then add a download link in WordPress.

However, this isn’t the best user experience for people who want to quickly look at a PDF document. For example, someone who is planning to visit your restaurant may prefer to read the PDF menu on your website rather than downloading a copy to their computer.

Instead, you can add a PDF viewer in WordPress and then show the PDFs directly on your website. This allows visitors to see the document without downloading it to their computer, which is often quicker and easier. This is particularly true for visitors who are using smartphones or tablets.

It also keeps visitors on your website, which may increase your pageviews and reduce your bounce rate.

With that being said, let’s see how you can easily add a PDF viewer to WordPress. Simply use the quick links to jump straight to the method you want to use.

Method 1. Add a PDF Viewer Using the Block Editor (Easy)

The easiest way to show PDFs on your WordPress website is by using the built-in File block.

This method doesn’t require a special plugin, but you can only customize the viewer in a few ways. If you want more advanced customizations and features, then we recommend using a plugin instead.

To get started, simply open the page or post where you want to add the PDF viewer in the content editor and then click on the ‘+’ button to add a new block.

After that, start typing in ‘File’ and select the right block when it appears.

The WordPress built-in File block

If you’ve already uploaded your PDF to the WordPress media library, then click on the ‘Media Library’ button. You can then select the PDF that you want to embed.

If you haven’t already uploaded the PDF, then click on ‘Upload’ and then choose a file from your computer.

Uploading a PDF file to WordPress

WordPress will automatically choose a size for the embedded PDF.

Note that the default view may not show the full document, but the ‘File’ block includes a toolbar that allows visitors to zoom in and out of the document. They can also scroll through the PDF to see more content.

How to add a PDF viewer in WordPress

If you prefer, then you can change the PDF viewer’s height to show more or less of the embedded document.

To do this, simply use the ‘Height in pixels’ slider in the right-hand menu.

Changing the height of an embedded PDF

Sometimes, visitors may want to download a PDF so they always have it close by. For example, customers may want to download the user manual for your most popular product or the programming schedule for an upcoming event or conference.

By default, WordPress shows a ‘Download’ icon in the toolbar and a button below the PDF.

How to allow visitors to download a PDF in WordPress

The ‘Download’ button beneath the PDF is useful for visitors who are unfamiliar with the different PDF toolbar icons. By showing a ‘Download’ button, visitors will immediately understand that this file is not tied to your site alone.

With that in mind, you may want to leave the ‘Download’ button enabled. However, if you don’t want to include this duplicate content then you can click to disable the ‘Show Download Button’ toggle.

Hiding the Download button in a PDF viewer

When you’re happy with how the PDF is set up, either click on ‘Update’ or ‘Publish’ to make your changes live.

Now if you visit your WordPress website you’ll see the PDF viewer in action.

A PDF viewer, created with the built-in WordPress File block

Method 2. Add a PDF Viewer in WordPress Using a Plugin (More Customizable)

The built-in WordPress File block should be a good fit for websites that simply want to embed a few PDFs. However, if you want more control over the viewer then it often makes sense to use a plugin instead.

PDF.js Viewer is one of the best PDF plugins for WordPress. It allows you to change the height and width of the PDF viewer, and remove buttons from the PDF toolbar.

It also comes with a fullscreen mode, which is perfect for showing longer documents such as ebooks and user manuals.

A PDF viewed in fullscreen mode

First, you’ll need to install and activate PDF.js Viewer. If you need help, then please see our guide on how to install a WordPress plugin.

Upon activation, go to Settings » PDFjs Viewer to configure the plugin’s settings.

The PDF.js Viewer plugin settings

Most of the time, you can override these default settings when embedding each PDF. For example, you can change an individual PDF’s settings for size or scale.

However, we still recommend changing the default settings to better match your own requirements, as this can save you a lot of time and effort.

By default, the plugin includes Download, Print, and Search buttons in the PDF toolbar. If you want to remove any of these buttons, then simply uncheck the box next to it.

Hiding buttons from the PDF viewer toolbar

You can also change the default embed height and width, and the ‘Viewer Scale.’

Out-of-the-box, PDF.js Viewer shows the PDF without any sidebar so visitors can see the full document when they arrive on the page. They can open the sidebar at any point by clicking on the ‘Toggle Sidebar’ button, as you can see in the following image.

Adding a sidebar to the PDF viewer in WordPress

If you plan to include longer documents or multi-page PDFs then it may be helpful to show the sidebar by default.

To do this, simply open the ‘Page Mode’ dropdown menu and select either Thumbs, Bookmarks, or Attachments.

Changing the mode in a PDF viewer

PDF.js Viewer allows visitors to open the PDF in fullscreen mode. By default, visitors can open this mode by clicking on a ‘View Fullscreen’ link above the embedded PDF.

To replace the text with your own custom messaging simply type into the ‘Fullscreen Link Text’ field.

Customizing the PDF's fullscreen mode

You can also choose whether the link opens in a new tab using the ‘Fullscreen Links in New Tabs’ box.

Launching a new tab will help to keep visitors on your website, but it can be annoying for mobile and tablet users.

Customizing the PDF viewer's fullscreen mode

Fullscreen mode makes it easier to read long documents so we recommend leaving this feature enabled. However, if you don’t want to use it then you can uncheck the box next to ‘Show Fullscreen Link.’

When you’re happy with how the plugin is set up, click on ‘Save Changes.’

You’re now ready to add a PDF viewer in WordPress. Simply open the page or post where you want to show the PDF and then click on the ‘+’ button.

You can now start typing in ‘Embed PDF.js Viewer’ and select the right block when it appears.

Adding a PDF to your WordPress website using a plugin

After that, click on ‘Choose PDF’ to open the WordPress media library.

You can now either choose a PDF from the library or upload a file from your computer.

Embedding a PDF on your WordPress website using a block

The plugin will use your default settings, but you can fine-tune how this PDF looks and acts using the settings in the right-hand menu.

Here, you can change the PDF’s height, width, and scale. You can also remove or customize the ‘View Fullscreen’ link.

Customizing the PDF embed block using a WordPress plugin

Finally, you can choose to remove or show the ‘Download’ and ‘Print’ buttons.

When you’re happy with how the PDF is set up, simply click on ‘Update’ or ‘Publish.’ You can now visit your WordPress blog or website to see the embedded PDF viewer.

A PDF, embedded directly on a WordPress blog or website

Bonus: How To Make Money From Your Embedded PDFs

If you have quality, useful PDFs then you can use them to make money online with WordPress.

After embedding a PDF document in your website, you can turn that page or post into exclusive members-only content. Visitors will then need to buy a membership to access that page or post, and see the embedded PDF.

The easiest way to turn WordPress into a membership site is by using MemberPress. It is the best WordPress membership plugin and allows you to turn any page or post into exclusive subscriber-only content, including embedded PDFs.

Make money by selling PDFs online

We have a complete guide on making a WordPress membership website with step-by-step instructions to help you get started.

We also suggest using Easy Digital Downloads to manage and sell PDFs on your website. You can sell all kinds of digital goods easily and embed PDFs in the product pages as previews, too.

We hope this article helped you add a PDF Viewer in WordPress. You may also want to take a look at our guide on how to create and sell online courses with WordPress or check out our list of the best email marketing 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 Add a PDF Viewer in WordPress first appeared on WPBeginner.

How to Add Multilingual Search in WordPress (2 Ways)

Do you want to add a multilingual search in WordPress?

If you have a multilingual WordPress site, then adding a multilingual search feature can help users find information more quickly by searching in their own language.

In this article, we’ll show you how to easily add multilingual search in WordPress and delight your users with a better user experience.

How to add multilingual search in WordPress

Why Should You Add Multilingual Search in WordPress?

Often users have trouble finding information on multilingual websites because either there is no search feature that they can use, or the search feature shows them content in the wrong language.

Adding a multilingual search feature helps users easily find the content they are looking for. This improves user experience which means users will stay longer on your website.

Research shows that engaged users are more likely to convert, subscribe, or make a buying decision.

That being said, let’s take a look at how to easily add a multilingual search in WordPress without breaking your website or writing any code.

Method 1: Adding Multilingual Search Using TranslatePress

If you haven’t made your multilingual website yet, or already using TranslatePress, then this method is for you.

TranslatePress is the best WordPress translation plugin on the market. It allows you to easily create a multilingual website using a live editor for quick and easier translation.

It works out of the box and allows default WordPress search to display multilingual results.

The disadvantage of this method is that it uses the default WordPress feature which is not very good at fetching the right results.

If you haven’t used TranslatePress before or need help, then see our tutorial on how to easily create a multilingual WordPress website.

Note: Keep in mind that the free version of TranslatePress only allows you to translate your website into one other language. So if you want to add multilingual search in WordPress for more than two languages, then you’d need to buy the TranslatePress Premium version.

Once you have translated some content on your WordPress website. It is time to add the search form.

Add a Search Block to your WordPress Site

WordPress comes with a built-in search block that you can add anywhere on your website.

If you’re using a block-based theme like Ultra, then you’ll be using the full site editor to add the search block.

Simply visit the Appearance » Editor page from the WordPress dashboard.

This will launch the full site editor which looks a lot like the block editor you use for writing posts and pages.

Now, click on the add block button (+) to add the Search block.

Adding search block in site editor

You can move the search block up and down to display it anywhere on the page.

Search block also comes with a few style options that you can choose from the block toolbar or settings.

Search block settings

Once you are finished, don’t forget to click on the Save button to save your changes.

You can now visit your website to see the search form in action.

Search form preview

On the other hand, if you’re using a theme that does not support the full-site editor, then you can add a search form as a widget.

Simply go to the Appearance » Widgets page from the WordPress admin dashboard.

Here, click the Add widget block button (+) and add the Search block to your widget area.

Search widget

Once the ‘Widget Block Menu’ opens up, locate the ‘Search’ block and add it to your WordPress sidebar.

Don’t forget to click the ‘Update’ button at the top to save your changes.

Once you’ve saved the changes, visit your site and see the search box in action.

Website preview

Method 2: Adding Multilingual Search Using SearchWP (Recommended)

The default WordPress search feature used by TranslatePress is not very good. It is quite basic and only looks for search terms in certain places.

This is where SearchWP comes in.

It is the best WordPress search plugin on the market and allows you to easily replace the default WordPress search with a more powerful search feature.

SearchWP

SearchWP automatically builds a search index and matches search keywords in content, title, categories, tags, shortcodes, documents, products, and more.

Plus, it automatically replaces the default search form upon activation so you don’t need to replace it if you were already using it on your site.

That being said, let’s take a look at how to easily add a better multilingual search to your WordPress site.

First, you need to install and activate the SearchWP plugin. For more information, see our guide on how to install a WordPress plugin.

After that, go to the SearchWP » Settings page and then click on the ‘License’ menu option to enter your license key.

You can get the license key from your ‘SearchWP Accounts’ page. Simply copy the license key from there.

After that, paste it into the ‘License Key’ field and then click on the Activate button.

SearcWP license

Now, you are ready to create your first custom search engine.

Simply go to the SearchWP » Settings page from the dashboard.

From here, you will see SearchWP’s first default search engine for you. It is pre-configured to work for most websites including multilingual websites.

You’ll see all your post types with different attributes. Next to each attribute there will be a slide that you can move to assign weight for that attribute.

SearchWP settings

You can also click on the Add/Remove Attributes button to include more areas in the search.

For instance, you can add custom fields and taxonomies to the attributes as well.

Add more attributes to search

If you are unsure about a setting, you can leave it as it is. The default options would work for more use cases.

Finally, click on the Save Engines button to store your settings.

SearchWP will now start building your search index in the background.

Now, all you need to do is add the search form to your site.

Add a Search Block to your WordPress Site

SearchWP replaces the built-in search feature, which means you can use the default WordPress search form and it would still use SearchWP to show the results.

If you haven’t already added a search form to your website, then here is how you would add it.

If you’re using a block-based theme, then you’ll be adding a search block using a full-site editor.

Simply go to the Appearance » Editor page from the admin dashboard.

On the edit screen, click on the add block button (+) at the top and add the search block.

You can move the search block to the area where you want to display the search form by moving it up or down.

Adding search block in site editor

Finally, don’t forget to click on the Save button to save your changes.

If you’re using a theme that doesn’t support the full-site editor, then you’ll need to add a search widget to your website’s sidebar or widget-ready area.

For that, head over to the Appearance » Widgets page from the dashboard.

Now click on the add block button (+) at the top to open up the ‘Widget Block Menu’.

From here, locate and add the Search widget to your preferred widget area.

Search widget

Don’t forget to click the ‘Update’ button at the top to save your changes.

Next, simply visit your website and use your improved search box.

Website preview

For more information and detailed instructions, take a look at our guide on how to improve WordPress search using SearchWP.

We hope this article helped you learn how to add multilingual search in WordPress. You may also want to check out our tutorial on how to fix WordPress search errors, and our article on how to create a multilingual sitemap 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.

The post How to Add Multilingual Search in WordPress (2 Ways) first appeared on WPBeginner.