Wednesday, March 31, 2021

How to Add Amazon Ads to Your WordPress Site (3 Methods)

Do you want to add Amazon ads to your WordPress site?

Amazon ads can be a great way to make money online. Plus, they have a faster and simpler approval process compared to other ad networks.

In this article, we’ll show you how to add Amazon ads to your WordPress site, step by step.

How to add Amazon ads to your WordPress site (3 methods)

What are Amazon Ads?

Amazon ads are display ads from the Amazon network. These ads operate similar to Google AdSense and other ad networks. However, these ads will display related products from Amazon.

You can add Amazon display ads throughout your content or at the end of your posts to encourage readers to click.

Native display ads will show relevant products to your visitors based on the content and their search history.

The setup process is very easy. All you need to do is add the code to your site once, and it’ll automatically display ads across your site. This means you earn more revenue without having to do any additional work.

There are 3 different types of native shopping ads you can add to your site:

  • Recommendation ads show products based on the content and user’s search history
  • Search ads let users search Amazon products directly from your website
  • Custom ads let you display your favorite products to your readers

Why Add Amazon Ads to WordPress?

Amazon ads have a much faster approval process, which means you can quickly start earning money with display ads and affiliate marketing.

Display advertising is one of the most popular ways WordPress blogs earn money.

However, a lot of advertising networks have strict approval processes, and it can take a while to get your site approved specially if you’re new.

Amazon ads can shortcut this waiting period. If you get approved by other networks in the future, then you can add these alongside your existing Amazon ads.

Depending on the type of site you have, these ads can convert pretty well too.

How to Add Amazon Ads to your WordPress Site

There are a handful of ways you can add Amazon ads to to your WordPress website.

Before you can ad Amazon ads to your site, you’ll need to join the Amazon.

Head over to the Amazon Associates program website and click the ‘Sign Up’ button.

Amazon Associates sign up

Next, you’ll be asked to log in to your existing Amazon account using the email and password associated with that account.

If you don’t have an Amazon account, then go ahead and create one now.

After you’ve logged in to your account, you’ll need to add additional account information and answer questions about your website. Follow the instructions to complete your profile.

Amazon Associates account information

Once you’ve finished, your application will be reviewed by Amazon. The approval process is pretty fast and much more accessible than other networks like Google AdSense.

Create Your Amazon Ads Code

Before you can add Amazon ads to WordPress, you’ll need to create your Amazon ad code.

To do this, open up the Amazon Associates ad editor. Then, navigate to Product Linking » Native Shopping Ads.

Amazon Native shopping ads

After that, click on ‘Recommendation Ads’.

You can also create ‘Custom Ads’ or ‘Search Ads’, but for this tutorial we’ll focus on recommended product ads.

Create recommendation ads

Here you’ll name your ad, choose your ad format, and select the product categories that products will display from.

You can also set a keyword fallback.

Add product keyword fallback

If there are no relevant products to display, then Amazon will pull a product related to that keyword.

You can also preview your ad on both desktop and mobile.

Save Amazon ad code

After you make your changes make sure to click ‘Save and View Ad Code’.

Then, you’ll need to copy the ad code and paste it into a text editor. You’ll need this code later to embed your ads into WordPress.

Copy Amazon ad code

Now, you’re ready to add Amazon ads to your WordPress site.

Method 1. Add Amazon Native Display Ads in WordPress

Adding Amazon display ads to WordPress is pretty simple.

You’ll have a variety of different display options and ad types to choose from.

For example, let’s say you’re writing an article about how to improve your posture. You could include Amazon Native display ads at the end of your post that feature posture correctors and other mobility tools.

Amazon ads example

The easiest way to add Amazon Ads is by using a WordPress plugin.

We recommend using the WP Advanced Ads plugin. It’s easy to use and lets you quickly embed multiple ad types into your website, including Amazon ads.

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

WP Advanced Ads add new

Once the plugin is installed and activated, you’ll have a new menu item called ‘Advanced Ads’. Navigate to Advanced Ads » Ads and click ‘New Ad’.

Next, add your title and select ‘Plain Text and Code’, then click ‘Next’.

WP Advanced Ads settings

After that, paste your Amazon ad code that you created earlier.

Then, click ‘Next’.

Add Amazon ad code to WP Advanced Ads

On the next screen, you can choose to hide the ad from some users and pages. However, we’ll leave the default settings. After that, click ‘Next’.

Now, we’re going to choose where our Amazon ads will display. You have multiple options to choose from including, before, after, and within your content. You also have the option to display Amazon ads in your sidebar.

We’re going to select ‘After Content’. However, you can choose the option that works best for your site.

Display Amazon ads after content

Once you select your display option, your ad will now be visible on the front end of your site.

Method 2. Add Amazon Affiliate Links in WordPress

Do you want to create an Amazon affiliate site? Affiliate websites operate a little differently than sites monetized by display ads alone.

With affiliate marketing, you’ll earn a commission whenever a visitor clicks on your link and purchases a product.

Adding Amazon affiliate links to your site is easy with the help of the right plugin. We recommend using Pretty Links or Thirsty Affiliates. These are two of the best affiliate marketing plugins for WordPress.

First thing you’ll need to do is install and activate the plugin. We’re going to use Pretty Links. However, you can choose Thirsty Affiliates as well. For more details, see our guide on how to install a WordPress plugin.

Upon activation, you’ll have a new menu item in your WordPress dashboard labeled Pretty Links.

Before you create an affiliate link in Pretty Links, you’ll need to go to your Amazon Associates dashboard and create a link. Once you’re in your dashboard, navigate to Product Linking » Product links.

Amazon product links

Here you can search for the product that you want to create a link for.

Once you’ve found the product, click ‘Get Link’.

Get Amazon affiliate link

Next, you’ll need to copy the link code.

To do this, click the ‘Text Only’ navigation item, then click the ‘Short Link’ radio button.

Amazon affiliate link copy

This will bring up the affiliate link you need to copy.

Now, go back to your WordPress dashboard and navigate to Pretty Links » Add New.

Pretty Links add new

Next, you’ll need to name your link, add your target URL, and create your link.

Your target URL is the link you copied from your Amazon Associates account. The ‘Pretty Link’ is the shortened URL you want to use instead.

Also, make sure you choose a 301 redirect. After you’ve made your changes click ‘Update’ to save the link.

Now, you can add your affiliate link to your content.

Open up a WordPress page or post. In the post editor, highlight the text you want to link and copy your affiliate link from above.

Add Amazon affiliate link

Now, when your readers click the link they’ll be taken to the product in the Amazon store. If they purchase the product, then you’ll receive a commission.

To learn more about affiliate marketing, see our ultimate affiliate marketing guide for beginners.

Method 3. Add Amazon Popup Ads in WordPress

Another unique way to add Amazon ads to your site is with a popup. You’ll have complete control over when and how the popup displays on your website.

You can even personalize the popups based on user behavior, their location, the page they’re viewing, and more.

The easiest way to add Amazon popup ads is by using OptinMonster. It’s one of the best WordPress lead generation plugins in the market used by over 1.2 million websites.

It allows you to add all kinds of popups to your WordPress site easily.

First, you’ll need to install and activate the OptinMonster plugin on your WordPress site.

The plugin acts as a connecter between your WordPress website and the OptinMonster software.

Once you’ve activated and installed the plugin, click on the ‘OptinMonster’ menu item in your WordPress admin bar.

OptinMonster main menu

After that, you’ll need to connect your site to OptinMonster by clicking ‘Launch the Setup Wizard’.

Here, you can connect to an existing account or claim your free account.

OptinMonster setup wizard

After you’ve finished going through the setup wizard, your WordPress site will be connected to OptinMosnter.

To start creating a popup ad, navigate to OptinMonster » Campaigns.

Then click ‘Add New’ to create a new campaign.

Add new OptinMonster campaign

After that, select the ‘Popup’ campaign type.

Next, choose the campaign template. We will select the ‘Canvas’ template since this gives us a blank template to add our Amazon ad code.

OptinMonster canvas template

Then, enter the name of your campaign name and click ’Start Building’.

The name of your campaign won’t appear in your design but instead is to help you remember.

Name OptinMonster campaign

This will open up the OptinMonster app, where you can customize the appearance of your popup.

You won’t be making that many visual changes. Instead, you will copy and paste the Amazon ad code you generated earlier.

OptinMonster HTML block

First, click on ‘Blocks’, then select the ‘HTML’ block and drag it over.

In the ‘Editing HTML Element’ box, paste your Amazon ad code. It’ll automatically appear in the editor.

Add Amazon HTML code

You can further customize your popup by adding new blocks, headings, text, and more.

Once you’re satisfied with the look of your popup, make sure to click ‘Save’, then click on the ‘Display Rules’ tab.

OptinMonster popup display rules

This is where we’ll set your popup display options.

The default setting is for the popup to display when a visitor has been on the page for at least 5 seconds. However, you can adjust this if you want the period to be shorter or longer. After that, click ‘Next Step’.

You can leave the default options on the next screen. Feel free to add animation or sound effects if you’d like. Once you’re done, click ‘Next Step’.

On the ‘Summary’ page, you can double check that your display settings are correct.

OptinMonster popup summary page

After that, go to the ‘Publish’ tab and switch the ‘Publish Status’ from Draft to Publish.

Then, click ‘Save’ and exit the screen.

Publish OptinMonster popup

Your Amazon ad popup will now be live on your site and display for visitors after the time period you set earlier.

The best part about OptinMonster is that it’s one of the few WordPress popup plugins that can give you complete control over personalization. Their display rules are extremely powerful, and you can use it to display multiple Amazon ads targeted towards different sections of your website.

We hoped this article helped you add Amazon ads to WordPress. You may also want to see our expert picks of the 24 must have plugins for WordPress and our list of the best email marketing services to grow your website revenue.

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 Amazon Ads to Your WordPress Site (3 Methods) appeared first on WPBeginner.


March 31, 2021 at 04:00PM

Tuesday, March 30, 2021

How to Add HTTP Security Headers in WordPress (Beginner’s Guide)

Do you want to add HTTP security headers in WordPress?

HTTP security headers allow you to add an extra layer of security to your WordPress website. They can help block common malicious activity from affecting your website performance.

In this beginner’s guide, we’ll show you how to easily add HTTP security headers in WordPress.

Adding HTTP security headers in WordPress

What are HTTP Security Headers?

HTTP security headers are a security measure that allows your website’s server to prevent some common security threats before it affects your website.

Basically, when a user visits your website, your web server sends an HTTP header response back to their browser. This response tells browsers about error codes, cache control, and other statuses.

The normal header response issues a status called HTTP 200. After which your website loads in the user’s browser. However, if your website is having difficulty then your web server may send a different HTTP header.

For example, it may send a 500 internal server error, or a not found 404 error code.

HTTP security headers are a subset of these headers and are used to prevent websites from common threats like click-jacking, cross-site scripting, brute force attacks, and more.

Let’s have a quick glance at what HTTP security headers look like and what they do to protect your website.

HTTP Strict Transport Security (HSTS)

HTTP Strict Transport Security (HSTS) header tells web browsers that your website uses HTTPs and should not be loaded using insecure protocol like HTTP.

If you have moved your WordPress website from HTTP to HTTPs, then this security header allows you to stop browsers from loading your website on HTTP.

X-XSS Protection

X-XSS Protection header allows you to block cross-site scripting from loading on your WordPress website.

X-Frame-Options

X-Frame-Options security header prevents cross-domain iframes or click-jacking.

X-Content-Type-Options

X-Content-Type-Options blocks content mime-type sniffing.

That being said, let’s take a look at how to easily add HTTP security headers in WordPress.

Adding HTTP Security Headers in WordPress

HTTP security headers work best when they are set at the web server level (i.e your WordPress hosting account). This allows them to be triggered early on during a typical HTTP request and provides maximum benefit.

They work even better if you are using a DNS-level website application firewall like Sucuri or Cloudflare. We’ll show you each method, and you can choose one that works best for you.

Here are quick links to different methods, you can jump to the one that suits you.

1. Adding HTTP Security Headers in WordPress using Sucuri

Sucuri is the best WordPress security plugin on the market. If you are using their website firewall service too, then you can set HTTP security headers without writing any code.

First, you will need to sign up for a Sucuri account. It is a paid service that comes with a sever level website firewall, security plugin, CDN, and malware removal guarantee.

During sign up, you will answer simple questions, and Sucuri documentation will help you set up the website application firewall on your website.

After signing up, you need to install and activate the free Sucuri plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, go to Sucuri Security » Firewall (WAF) page and enter your Firewall API key. You can find this information under your account on Sucuri website.

Sucuri WAF API key

Click on the Save button to store your changes.

Next, you need to switch to your Sucuri account dashboard. From here, click on the Settings menu on top and then switch to the Security tab.

Setting HTTP security headers in Sucuri

From here you can choose three sets of rules. The default protection, HSTS, and HSTS Full. You will see which HTTP security headers will be applied for each set of rules.

Click on the ‘Save Changes in The Additional Headers’ button to apply your changes.

That’s all, Sucuri will now add your selected HTTP security headers in WordPress. Since it is a DNS level WAF, your website traffic is protected from hackers even before they reach your website.

2. Adding HTTP Security Headers in WordPress using Cloudflare

Cloudflare offers a basic free website firewall and CDN service. It lacks advanced security features in their free plan, so you will need to upgrade to their Pro plan which are more expensive.

To add Cloudflare on your site, see our tutorial on how to add Cloudflare free CDN in WordPress.

Once Cloudflare is active on your website, go to the SSL/TLS page under your Cloudflare account dashboard and then switch to the Edge Certificates tab.

Setting up HTTPS security headers in Cloudflare

Now, scroll down to the HTTP Strict Transport Security (HSTS) section and click on the ‘Enable HSTS’ button.

Enable HSTS on Cloudflare

This will bring up a popup with instructions telling you that you must have HTTPS enabled on your WordPress blog before using this feature. Click on the Next button to continue, and you will see the options to add HTTP security headers.

Enable HTTPS security headers in Cloudflare

From here, you can enable HSTS, no-sniff header, apply HSTS to subdomains (if they are using HTTPS), and preload HSTS.

This method provides basic protection using HTTP security headers. However, it does not let you add X-Frame-Options and Cloudflare doesn’t have a user interface to do that.

You can still do that by creating a script using the Workers feature. However, creating an HTTPS security header script may cause unexpected issues for beginners which is why we wouldn’t recommend it.

3. Adding HTTP Security Headers in WordPress using .htaccess

This method allows you to set the HTTP security headers in WordPress at the server level.

It requires you to edit the .htaccess file on your website. It is a server configuration file used by the most commonly used Apache webserver software.

Simply connect to your website using an FTP client, or the file manager app in your hosting control panel. In the root folder of your website, you need to locate the .htaccess file and edit it.

Edit the .htaccess file in WordPress

This will open the file in a plain text editor. At the bottom of the file, you can add the code to add HTTPS security headers to your WordPress website.

You can use the following sample code as a starting point, it sets the most commonly used HTTPs security headers with optimal settings:

<ifModule mod_headers.c>
Header set Strict-Transport-Security "max-age=31536000" env=HTTPS
Header set X-XSS-Protection "1; mode=block"
Header set X-Content-Type-Options nosniff
Header set X-Frame-Options DENY
Header set Referrer-Policy: no-referrer-when-downgrade
</ifModule>

Don’t forget to save your changes and visit your website to make sure that everything is working as expected.

Note: Incorrect headers or conflicts in .htaccess file may trigger 500 Internal server error on most web hosts.

4. Adding HTTP Security Headers in WordPress using Plugin

This method is a little less effective as it relies on a WordPress plugin to modify the headers. However, it is also the easiest way to add HTTP security headers to your WordPress website.

First, you need to install and activate the Redirection plugin. For more details, see our step by step guide on how to install a WordPress plugin.

Upon activation, the plugin will show a set up wizard that you can just follow along to set up the plugin. After that, go to Tools » Redirection page and switch to the ‘Site’ tab.

Site settings in Redirection plugin

Next, you need to scroll down to the bottom of the page to the HTTP Headers section and click on the ‘Add Header’ button. From the drop-down menu, you need to select ‘Add Security Presets’ option.

Adding header presets using Redirection

After that, you will need to click on it again to add those options. Now, you will see a preset list of HTTP security headers appear in the table.

HTTP security header presets

These headers are optimized for security, you can review them and change them if needed. Once you are done, don’t forget to click on the Update button to save your changes.

You can now visit your website to make sure that everything is working fine.

How to Check HTTP Security Headers for a Website

Now that, you have added HTTP Security headers to your website. You can test your configuration using the free Security Headers tool. Simply enter your website URL and click on the Scan button.

Checking your WordPress security headers

It will then check HTTP security headers for your website and will show you a report. The tool would generate a so-called grade label which you can ignore as most websites would get a B or C score at best without affecting user experience.

It will show you which HTTP security headers are sent by your website and which security headers are not included. If the security headers that you wanted to set are listed there, then you are done.

That’s all, we hope this article helped you learn how to add HTTP security headers in WordPress. You may also want to see our complete WordPress security guide, and our expert pick of the best WordPress plugins for business websites.

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 HTTP Security Headers in WordPress (Beginner’s Guide) appeared first on WPBeginner.


March 30, 2021 at 04:00PM

Monday, March 29, 2021

How to Add Subscriptions to WooCommerce (Free Alternative)

Do you want to add subscriptions to WooCommerce in WordPress?

Adding subscriptions lets you offer memberships, create premium content, and generate consistent revenue for your business.

In this article, we’ll show you how to easily add recurring subscriptions to WooCommerce using multiple methods.

How to add subscriptions to WooCommerce (free alternative)

Why Add Subscriptions to WooCommerce?

There are many benefits to adding WooCommerce subscriptions to your WordPress site.

First, it helps to automate the billing process and saves you a lot of time. You don’t have to manually invoice your customers every single month.

By adding subscription payments to your ecommerce business, you’ll have more consistent cash flow, fewer payment errors, and less payment delays.

It also gives you more flexibility in the type of ecommerce site you can create.

  • A recurring physical product subscription like Dollar Shave Club
  • A members only online store, like a virtual version of Costco
  • A curated membership box like Stitch Fix

That being said, let’s take a look at how to add subscriptions to WooCommerce.

We’ll cover multiple ways to add subscriptions to WooCommerce, and you can choose the one that works best for your business.

Method 1. Add WooCommerce Subscriptions (Paid Option)

This method is easier and recommended for most WooCommerce store owners.

For this, we’ll be using the official WooCommerce Subscriptions extension.

WooCommerce subscriptions extension

This extension is built by the team behind WooCommerce. It allows you to create and manage subscription products and create recurring payments.

You’ll be able to do things like create subscriptions for digital and physical products, create monthly subscription boxes, yearly software packages, and more.

The easiest way to get started with WooCommerce Subscriptions is to sign up for Bluehost WooCommerce hosting.

Bluehost has agreed to offer an exclusive discount for our readers that also includes the $199 WooCommerce subscription extension for free.

→ Click Here to Claim This Exclusive Bluehost Offer ←

Aside from free WooCommerce subscriptions, this Bluehost plan also comes with close to $1000 worth of premium extensions for free including Online Bookings & Appointments, Jetpack Premium, and more.

This is why they’re among the top WooCommerce hosting providers in our list.

Once you sign up for hosting, both WooCommerce and the WooCommerce Subscriptions extension will be automatically installed.

After that, you can easily add subscriptions to any WooCommerce products in to your online store.

You’ll have an option in your WooCommerce product editing page where you can set your subscription settings.

WooCommerce subscription options

For more help with WooCommerce, see our ultimate WooCommerce tutorial.

Method 2. Add WooCommerce Subscriptions (with a Free Plugin)

This method is for store owners on a budget who want to add subscriptions to WooCommerce for free.

To do this, we’ll use the YITH WooCommerce Subscription plugin. This free plugin lets you simply add subscriptions for simple, digital, or downloadable products.

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

After the plugin is installed and activated, you’ll have a new menu item called ‘YITH’ in your WordPress dashboard.

Navigate to YITH » Subscriptions and select ‘Settings’ and make sure the ‘Enable Subscription’ box is set to ‘Yes.’

Enable YITH WooCommerce subscription setting

Next, open a product you want to turn into a subscription by navigating to Products » All Products.

Then, select your subscription product.

Select WooCommerce product for subscription

After that, go to the ‘Product data’ box and check the ‘Subscription’ check box.

This will add a new option where you can set the subscription price and maximum length of the subscription.

Set product subscription price with YITH

Once you’ve added your subscription settings, make sure you save your product by clicking the ‘Update’ button.

Now, when your visitors purchase a product, they’ll have the subscription payment option.

Subscription product example

Method 3. Add WooCommerce Subscriptions for Memberships and Courses

Are you creating a membership site or selling online courses and want to set up subscription payments for your visitors?

This is where MemberPress comes in. It’s the best WordPress membership plugin in the market.

You can sell subscriptions, online courses, premium content, and digital downloads with this plugin.

MemberPress membership page

To add membership subscriptions, first, you’ll need to create your membership website. To get started, see our step by step guide on creating a WordPress membership site.

After that, you can add recurring subscription memberships with MemberPress.

To do this, see our step by step guide on how to accept recurring payments in WordPress.

Once you’ve set up subscription memberships, you can assign your WooCommerce products to your memberships.

This allows you to hide specific products and make users sign up for a membership to view your products or make a purchase.

To do this, navigate to MemberPress » Rules and click ‘Add New’.

MemberPress rule settings

Next, under the ‘Rule Options’ setting, select ‘All Products’ from the drop down list.

Then, select the membership level you want to give access to the products. In this case, we’re only giving our ‘Monthly Subscription’ members access to the products in our store.

Configure membership rule

Once you’ve made these changes make sure to save your changes by clicking ‘Save Rule’.

You can also use MemberPress as full LMS plugin to create courses. Aside from membership, MemberPress is also the best WordPress LMS plugin in the market.

It lets you simply create online courses with an immersive learning experience. With their course addon, you can drip feed content, add engagement triggers to keep your students active, all with an easy to use drag and drop builder.

Add course sections in MemberPress

The courses feature work seamlessly with any WordPress theme, and their class room mode feature is our favorite because it offers a distraction free learning experience.

The MemberPress course curriculum that users see, showing their progression through the course

Once your customers sign up for a membership level in MemberPress, they’ll be automatically enrolled in your courses. You can even bundle your courses together for a discount and sell course access as a recurring subscription.

We hoped this article helped you add subscriptions to WooCommerce. You may also want to see our list of the best WooCommerce plugins for your store and our ultimate guide on WooCommerce SEO.

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

The post How to Add Subscriptions to WooCommerce (Free Alternative) appeared first on WPBeginner.


March 29, 2021 at 03:30PM

Friday, March 26, 2021

6 Best Video Editing Software of 2021 Compared (Easy & Powerful)

Are you looking for the best video editing software?

Video editing software lets you create professional videos for your WordPress site, Instagram, YouTube, and other social media channels.

In this article, we’ve hand-picked some of the best video editing software that you can use to easily create videos. We have used these tools to create YouTube videos that have gotten over 500 million views.

Best video editing software compared

Why is Choosing the Best Video Editing Software Important?

It’s no secret that video content is taking over the world.

We all use streaming services like Netflix, video-focused social media networks like TikTok, IGTV, and Snapchat. Plus, there’s YouTube, the second largest search engine in the world.

The right video editing software can help you in a lot of ways:

Picking the right video editing software and learning the tool’s ins and outs can transform your WordPress website and online presence.

You can use it to create professional quality videos for your YouTube channel, Facebook ads, Instagram profile, and more.

Over the last 10 years, we have tried all the popular video software in our quest to grow our YouTube channels. The WPBeginner channel has over 233,000 subscribers on YouTube.

We had another channel that we grew to 2.5 million subscribers and 500 million subscribers before selling it in 2018.

While we’re not video pros, we have learnt a few things over the years.

Here are the most important things you’ll need to consider when choosing the best video editing software:

  • The type of videos you’re going to create
  • The kind of computer you’re using (Apple or Windows)
  • The video file types you’re going to be editing
  • The transitions and effects you want to apply
  • Your existing skillset with video editing

Having said that, let’s take a look at some of the best video editing software in the market today.

1. Adobe Premiere Pro

Adobe Premiere Pro

Adobe Premiere Pro is the best all-around video editing software. It’s the industry standard for professionals in Hollywood, television, and is even used by popular YouTubers.

It’s cross platform compatible and works on both Mac and Windows.

If you’re already an Adobe user and are using other products like, Photoshop, After Effects, or Adobe Stock, then it makes sense to use Premiere Pro since it integrates with the other products seamlessly.

It supports the latest 4K, 8K, and VR video formats and can handle multi-angle shots. It also has advanced trimming and editing tools to give you high levels of control.

There are robust color grading, color correction, and compositing features. Plus, there’s chroma key options to remove backgrounds for green screen videos.

You can import from virtually any source or format, and you have an unlimited number of video tracks to flex your creativity.

You’ll even find automated tools with the Adobe Sensei technology, which works to help speed up the editing process.

Finally, there are a ton of exporting options. You can easily export directly to YouTube, Vimeo, and more.

Note: If you want a more affordable and beginner-friendly tool, then Adobe Premiere Elements is a great choice.

Beyond the video editing tools, there’s a wealth of audio editing tools as well. The sound panel comes equipped with features and effects like reverb, compression, amplification, stereo balance, and more.

You can subscribe to Adobe Premiere Pro by itself for $239.88 per year. Or you can purchase the entire Creative Cloud suite ($52.99 per month) which gives you access to all 20+ Adobe apps including Premiere Pro, Photoshop, Illustrator, XD, all Adobe Pro fonts, and collaboration tools.

The creative suite is great value and that’s what we use for our business.

Expert Review: We believe Adobe Premiere Pro is best overall video editing software.

2. Camtasia

Camtasia

Camtasia is primarily known for its screen recording features, but you’ll also find powerful video editing functionality.

The combination of screen recording and editing tools makes it perfect for creating YouTube tutorials, online course lessons, how-to videos, product reviews, and more.

You’ll find a library of video templates you can use to easily create the exact kind of video that you want.

The process for editing videos is very straightforward. Just use the drag and drop editor to edit your video and add animations and transition effects quickly.

There’s also an integration with PowerPoint to help you create captivating presentations and tutorials. You’ll even find cool interactive features like quizzes that you can add to your videos.

You can use the iPhone app to record videos on your phone and edit them using the software. This is great if you’re creating mobile tutorial videos or walkthroughs.

Camtasia offers an individual plan for $249.99, which gives you access to all features and is compatible with both Windows and Mac.

Larger teams can purchase the business license, and there are both education, government, and non-profit discounts available.

Expert Review: We believe Camtasia is best video editing software for online course creators and how-to video editors.

Several of our team members use Camtasia to create screencast tutorial videos for our products.

3. Promo

Promo

Promo is a great online video editor perfect for making marketing videos. It’s incredibly easy to use. Even if you’re not tech-savvy, you can put together promotional content quickly and simply.

If you get stuck when coming up with Instagram video ideas or video ads for Facebook and YouTube, then this tool is for you.

It only takes a couple of clicks to create an engaging video ready to post online. It’s super easy.

All you have to do is choose your campaign type or industry, select from one of 5 million templates, then add customizable animations, video clips, and text. You can even see your changes in real-time.

You’ll find templates in industries like business, real estate, marketing, travel, ecommerce, and recruiting and HR.

Plus, specialized templates for marketing tasks like promo videos, Facebook ads, Instagram ads, YouTube Ads, and LinkedIn ads.

For those who want more creative control, you can start from scratch with a blank template.

The Basic plan starts at $49 per month.

If you create a lot of marketing videos, then the Standard plan gives you access to unlimited premium clips and video downloads, plus you can add watermark to your videos for $99 per month.

The premium plans also give you access to an iOS or Android mobile app, which lets you create videos on the go.

Expert Review: We believe Promo is the best video editor for creating and editing marketing videos. It’s great for business owners, marketers, and non-techy users.

4. Wondershare Filmora

Filmora by Wondershare

Filmora by Wondershare is a very simple and easy to use video editing software. It has a short learning curve, so it’s perfect for those just getting started with video editing.

Even if you’ve never used a video editing software before, you can use this intuitive and easy to navigate editor to create your first video.

As your skills improve, you can take advantage of the advanced editing features this tool offers such as noise removal, speed control, color tuning, and more.

You’ll also find a library of visual effects and built-in titles that are designed with YouTubers in mind. There’s also a library of royalty-free music and sound effects you can use in your videos.

The most recent release added features like motion graphics, color matching, and a keyboard shortcuts editor to help you create your own time saving workflows.

There’s also a free mobile app for editing videos on the go, and simply uploading to Instagram or YouTube.

The premium version costs $69.99 for a lifetime payment, or you can choose to pay $44.99 per year.

There is a free version available, which has all the same features as the paid version. But, your videos will have their company watermark present.

If you want unlimited downloads from the stock film library, then there’s a Bundle plan for $104.87 per year.

Expert Review: We believe Wondershare Filmora is the best beginner-friendly video editing software.

5. Final Cut Pro

Final Cut Pro

Final Cut Pro is the best video editing software for macOS used by over 2 million people. This tool is very easy to use, despite being so powerful.

Final Cut Pro and Adobe Premiere Pro offer a nearly identical set of features. The big difference is Final Cut Pro X isn’t Windows compatible.

It’s equipped with advanced functionality to help you edit videos faster like, Smart Conform cropping, which will ensure that no essential scenes get cut.

There are grouping tools, organization features, animation templates, transitions, and a library of video effects. Plus, built-in audio editing features.

If you’re going to post videos to Facebook or YouTube, then you can use the export feature to automatically optimize and set the right aspect ratio for these platforms.

Since Final Cut Pro isn’t subscription-based, it offers you a simpler pricing model. Pay a one time fee of $299.99 and access the software forever.

Expert Review: We believe Final Cut Pro is the best video editing program for Mac users.

6. CyberLink PowerDirector 365

CyberLink PowerDirector 365

CyberLink PowerDirector 365 is feature-rich high-end video editing software. However, it doesn’t carry the high price tag of tools with a similar set of features.

You’ll find functionality like a 100-track timeline, video correction tools, motion tracking, support for multi-cam editing, and stabilization features (great for GoPro footage).

It also has support for 360-degree video editing and nearly all file formats and file types.

Beyond the standard professional video editing features, there are additional features and pre-made templates for creating slideshows, DVD menus, and even screen recording.

Now, the tool isn’t the most intuitive for beginners. However, there is a massive video tutorial library to help you use the software.

This software starts at $19.99 per month, or you can pay $51.99 for the year, which is $4.33 monthly.

Expert Review: We believe CyberLink PowerDirector 365 is the best for users who need advanced features, but have a small budget.

Which is the Best Video Editing Software for You?

After carefully researching and testing the top video editing software, we believe that Adobe Premiere Pro is the best video editing software in the market.

It’s the industry leading software used for everything from Hollywood productions to YouTube videos and everything in-between.

It has every feature you could want and plenty of tutorials for beginners who are just getting started using the software.

If you’re looking for creating guided video tutorials (screencasts + video), then Camtasia is the best cross-platform video editing software for screen recording.

If you’re looking for an easy tool for creating promo videos for social media ads or marketing campaigns, then Promo.com comes with a lot of templates. It’s made for marketers & non-techies.

Aside from the top video editing software in our list, we also looked at other video editing software like Corel VideoStudio, DaVinci Resolve, Pinnacle Studio, Lightworks, VSDC, Shotcut, and HitFilm Express.

However, we decided not to list them to help make your decision easy and avoid choice paralysis.

Best Video Editing Software FAQs

Having helped thousands of users find the best video editing software for their needs, we’ve answered a lot of questions.

Below are some of the most common questions we’ve received about video editing software providers.

What is the best free video editing app?

The best free video editing app is the iMovie movie maker. The free software comes preinstalled on most Mac machines.

It’s beginner-friendly and has plenty of special effects to enhance your videos. It also works on iPads.

If you’re not using macOS, then Wondershare Filmora has a great free video editing app. It’s packed with advanced features and a beginner learning curve.

What’s the best video editing software for beginners?

The best video editing software for beginners is Filmora. It’s intuitive, easy to use, and comes with filters, overlays, transitions, motion elements, and more.

It also has a mode called “Easy Mode” that lets you create simple edits by choosing a theme and dragging and dropping clips and presets.

Adobe Premiere Element is also pretty beginner friendly.

If you’re looking to create promo videos, then Promo.com is the easiest video editing software for non-techies & marketers.

What do most YouTubers use to edit their videos?

Most YouTubers use popular video editing software like Final Cut Pro, Adobe Premiere Pro, and iMovie. However, most video editing tools have similar features overall.

If you’re starting a YouTube channel, then the best video editing software is one that you can use and fits within your budget. As your channel grows, you can improve your skills and invest in professional video editing software.

We hoped this article helped you find the best video editing software to use with your WordPress site. You may also want to see our expert list of the best webinar software and best online course platforms to create & sell online courses.

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 6 Best Video Editing Software of 2021 Compared (Easy & Powerful) appeared first on WPBeginner.


March 26, 2021 at 05:00PM

Thursday, March 25, 2021

WordPress Body Class 101: Tips and Tricks for Theme Designers

Are you an aspiring WordPress theme designer looking for new ways to use CSS into your themes?

Luckily, WordPress automatically adds CSS classes that you can utilize in your themes. Several of these CSS classes are automatically added to the <body> section of every page on a WordPress site.

In this article, we will explain the WordPress body class with tips and tricks for aspiring theme designers to utilize them in their projects.

Using WordPress body class for theme development
Here is a quick overview of what you’ll learn in this article.

What is WordPress Body Class?

Body class (body_class) is a WordPress function that allows you to assign CSS classes to the body element.

The HTML body tag normally begins in a theme’s header.php file, which loads on every page. This allows you to dynamically figure out which page a user is viewing and then add the CSS classes accordingly.

Normally most starter themes and frameworks already include the body class function inside the HTML body tag. However, if your theme does not have it, then you can add it by modifying the body tag like this:

<body <?php body_class($class); ?>>

Depending on the type of page being displayed, WordPress automatically adds the appropriate classes.

For example, if you are on an archive page, WordPress will automatically add archive class to the body element. It does that for just about every page.

Related: See how WordPress works behind the scenes (infographic)

Here are some examples of common classes that WordPress might add, depending on which page is being displayed:

.rtl {}
.home {}
.blog {}
.archive {}
.date {}
.search {}
.paged {}
.attachment {}
.error404 {}
.single postid-(id) {}
.attachmentid-(id) {}
.attachment-(mime-type) {}
.author {}
.author-(user_nicename) {}
.category {}
.category-(slug) {}
.tag {}
.tag-(slug) {}
.page-parent {}
.page-child parent-pageid-(id) {}
.page-template page-template-(template file name) {}
.search-results {}
.search-no-results {}
.logged-in {}
.paged-(page number) {}
.single-paged-(page number) {}
.page-paged-(page number) {}
.category-paged-(page number) {}
.tag-paged-(page number) {}
.date-paged-(page number) {}
.author-paged-(page number) {}
.search-paged-(page number) {}

As you can see, by having such a powerful resource at hand, you can entirely customize your WordPress page by using just CSS. You can customize specific author profile pages, date-based archives, etc.

That being said, now let’s take a look at how and when would you use the body class.

When to use The WordPress Body Class

First, you need to make sure that your theme’s body element contains the body class function as shown above. If it does, then it will automatically include all the WordPress generated CSS classes mentioned above.

After that, you will also be able to add your own custom CSS classes to the body element. You can add these classes whenever you need them.

For example, if you want to change the appearance of articles by a specific author filed under a specific category.

How to Add Custom Body Classes

WordPress has a filter that you can utilize to add custom body classes when needed. We will show you how to add a body class using the filter before showing you the specific use case scenario just so everyone can be on the same page.

Because body classes are theme specific, you would need to add the following code to your theme’s functions.php file.

function my_class_names($classes) {
        // add 'class-name' to the $classes array
        $classes[] = 'wpb-class';
        // return the $classes array
        return $classes;
}

//Now add test class to the filter
add_filter('body_class','my_class_names');

The above code will add a class “wpb-class” to the body tag on every page on your website. That’s not so bad, right?

Now you can utilize this CSS class in your theme’s stylesheet directly. If you are working on your own website, then you can also add the CSS using the custom CSS feature in theme customizer.

Adding custom CSS in theme customizer

Adding Body Class Using a WordPress Plugin

If you are not working on a client project and don’t want to write code, then this method would be easier for you.

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

Upon activation, you need to visit Settings » Custom Body Class page. From here you can configure plugin settings.

Custom Body Class settings

You can select post types where you want to enable body class feature and who can access it. Don’t forget to click on the save changes button to store your settings.

Next, you can head over to edit any post or page on your WordPress site. On the post edit screen, you will find a new meta box in the right column labeled ‘Post Classes’.

Adding body classes to a post in WordPress

Click to add your custom CSS classes. You can add multiple classes separated by a space.

Once you are done, you can simply save or publish your post. The plugin will now add your custom CSS classes to the body class for that particular post or page.

Using Conditional Tags with The Body Class

The real power of the body_class function comes when it is used with the conditional tags.

These conditional tags are true or false data types that check if a condition is true or false in WordPress. For example, the conditional tag is_home checks if the page currently displayed is the homepage or not.

This allows theme developers to check if a condition is true or false before adding a custom CSS class to the body_class function.

Let’s take a look at some examples of using conditional tags to add custom classes to the body class.

Let’s say you want to style your homepage differently for logged in users with the author user role. While WordPress automatically generates a .home and .logged-in class, it does not detect the user role or add it as a class.

Now, this is a scenario where you can use the conditional tags with some custom code to dynamically add a custom class to the body class.

To achieve this you will add the following code to your theme’s functions.php file.

function wpb_loggedin_user_role_class($classes) { 

// let's check if it is homepage
if ( is_home() ) {

// Now let's check if the logged in user has author user role.  
$user = wp_get_current_user();
if ( in_array( 'author', (array) $user->roles ) ) {
    //The user has the "author" role
    // Add user role to the body class
    $classes[] = 'author';
    // Return the classes array
    return $classes;      
} 
} else { 
// if it is not homepage, then just return default classes
return $classes; 
}
} 

add_filter('body_class', 'wpb_loggedin_user_role_class');

Now, let’s take a look at another useful example. This time we are going to check if the page displayed is a preview of a WordPress draft.

To do that we will use the conditional tag is_preview and then add our custom CSS class.

function add_preview_class($classes) { 
if ( is_preview() )  {
$classes[] = 'preview-mode';
return $classes;
}
return $classes; 
}
add_filter('body_class','add_preview_class');

Now, we will add the following CSS to our theme’s stylesheet to utilize the new custom CSS class we just added.

.preview-mode .site-header:before { 
content:'preview mode';
color:#FFF;
background-color:#ff0000;
}

This is how it looked on our demo site:

Custom preview mode CSS class added to the body class

You may want to check out the full list of conditional tags that you can use in WordPress. This will give you a handy set of ready to use tags for your code.

Other Examples of Dynamically Adding Custom Body Classes

Apart from conditional tags, you can also use other techniques to fetch information from the WordPress database and create custom CSS classes for the body class.

Adding category names to the body class of a single post page

Let’s say you want to customize the appearance of single posts based on the category they are filed in. You can use the body class to achieve this

First, you need to add category names as CSS class on single post pages. To do that, add the following code to your theme’s functions.php file:

// add category nicenames in body class
function category_id_class($classes) {
    global $post;
    foreach((get_the_category($post->ID)) as $category)
        $classes[] = $category->category_nicename;
    return $classes;
}
 
add_filter('body_class', 'category_id_class');

The code above will add the category class in your body class for single post pages. You can then use CSS classes to style it as you wish.

Adding page slug to the body class

Paste the following code in your theme’s functions.php file:

//Page Slug Body Class
function add_slug_body_class( $classes ) {
global $post;
if ( isset( $post ) ) {
$classes[] = $post->post_type . '-' . $post->post_name;
}
return $classes;
}
add_filter( 'body_class', 'add_slug_body_class' );

Browser Detection and Browser Specific Body Classes

Sometimes you may come across issues where your theme may need additional CSS for a particular browser.

Now the good news is that WordPress automatically detects browser upon loading and then temporary stores this information as a global variable.

You just need to check if WordPress detected a specific browser and then add it as a custom CSS class.

Simply, copy and paste the following code in your theme’s functions.php file:


function wpb_browser_body_class($classes) { 
        global $is_iphone, $is_chrome, $is_safari, $is_NS4, $is_opera, $is_macIE, $is_winIE, $is_gecko, $is_lynx, $is_IE, $is_edge;

if ($is_iphone)    $classes[] ='iphone-safari';
elseif ($is_chrome)    $classes[] ='google-chrome';
elseif ($is_safari)    $classes[] ='safari';
elseif ($is_NS4)    $classes[] ='netscape';
elseif ($is_opera)    $classes[] ='opera';
elseif ($is_macIE)    $classes[] ='mac-ie';
elseif ($is_winIE)    $classes[] ='windows-ie';
elseif ($is_gecko)    $classes[] ='firefox';
elseif ($is_lynx)    $classes[] ='lynx';
elseif ($is_IE)      $classes[] ='internet-explorer';
elseif ($is_edge)    $classes[] ='ms-edge';
else $classes[] = 'unknown';
        
return $classes;
}
add_filter('body_class','wpb_browser_body_class');

You can then use classes like:

.ms-edge .navigation {some item goes here}

If it is a small padding or margin issue, then this is a fairly easy way of fixing it.

There are definitely many more scenarios where using the body_class function can save you from writing lengthy lines of code. For example, if you are using a theme framework like Genesis, then you can use it to add custom classes in your child theme.

You can use the body_class function to add CSS classes for full-width page layouts, sidebar content, header and footers, etc.

We hope this article helped you learn how to use the WordPress body class in your themes. You may also want to see our article on how to style each WordPress post differently, and our comparison of best WordPress page builder 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 WordPress Body Class 101: Tips and Tricks for Theme Designers appeared first on WPBeginner.


March 25, 2021 at 03:06PM

Wednesday, March 24, 2021

How to Easily Find and Remove Stolen Content in WordPress (5 Ways)

Are you looking for a way to find and remove stolen content in WordPress?

You’ve worked hard on your website, but now your content has been stolen, published, and is taking traffic away from your brand.

In this article, we’ll show you how you can find and remove stolen content in WordPress, no matter if it’s a single post or your entire site has been copied.

5 ways to find and remove stolen content in WordPress

How and Why is Website Content Stolen?

One widespread method for stealing content is blog content scraping. This is where content is taken from your site, usually via your RSS feed, and republished on another site.

Sometimes your content will be simply copied and pasted directly to another website, including your formatting, images, videos, and more.

Other times, your content will be reposted with attribution and a link back to your website, but without your permission. Although this can help your SEO, you may want to keep your original content hosted on your site only.

Usually, the main motivation for content theft is to profit off of your hard work.

Having your content stolen is a stressful experience that a lot of WordPress site owners unfortunately experience.

Just know that you’re not alone, and it’s a problem that can be fixed.

Here are the 5 most common ways to find and remove stolen content in WordPress.

1. Set Up Automatic Content Theft Notifications

Sometimes your loyal visitors will alert you that your content has been stolen, or they saw it somewhere else on the web.

Luckily, you don’t have to wait for a helpful reader to notify you.

Google Alerts is often used for brand name notifications. You enter the name of your website and get email notifications whenever you’re mentioned online.

But, this same feature can be used to alert you of content that’s being used without your permission.

Simply navigate to Google Alerts. Next, enter the name of your website, your URL, or use a portion of your article.

For example, if you end every blog post with the same CTA, then you can get notifications whenever this appears online.

Set up Google Alerts stolen content

After that, you’ll choose the ‘Sources’. Select ‘Blogs’ and ‘Web’ from the drop-down list. Then, click ‘Create Alert’.

Now, you’ll receive an email whenever your content appears on the web or your website is mentioned.

2. Manually Search for Stolen Content

Copyscape is a plagiarism checker tool that can also be used to find stolen content published elsewhere across the web.

All you have to do is navigate to Copyscape and enter your website URL. You can also enter a page or post URL to see if one of your blog posts or site pages have been copied and stolen.

Copyscape stolen content results

The free version of the tool gives you the top 10 results, which should be enough for smaller WordPress blogs.

If you have a bigger website, or you want results of every single mention of your copied text, then you’ll need to upgrade to the premium version.

The paid version of the tool lets you check up to 10,000 pages with a single click. If you publish a lot of content on your WordPress website, then this could be very useful.

Another manual tool you can use is Grammarly. Grammarly is a popular online grammar checking tool.

The premium version of Grammarly has a built-in plagiarism checker. You can copy and paste your content into the tool, and it’ll run a scan to see if any matches turn up online.

Grammarly plagiarism check

3. Contact the Offending Host or Registrar

So, you’ve found stolen content, now what?

The simplest way to take down stolen content is to file a DMCA complaint against the website.

Usually, if it’s a spam website, or a site that’s scraping your content from your RSS feed, then it can be difficult to find contact information.

However, you can use the IsItWP lookup tool to find out where the domain and website are hosted.

IsItWP website lookup tool

Simply enter the domain that’s published your stolen content and click ‘Analyze Website’.

The tool will pull up any available information, including the web hosting company and registrar.

IsItWP website lookup results

You’ll notice that the host and registrar are shown, even if the website isn’t using WordPress. You can contact the host and registrar directly to try and get the site taken down.

Since stealing content is an illegal activity, web hosting companies don’t want to host websites that are breaking the law.

Most reputable web hosting companies take DMCA requests seriously and will work with you to resolve the situation including removing the pages in violation.

4. Submit a Takedown Notice to Google

Another way to remove stolen content is to contact Google directly.

You need to be careful using this method because it requires a lot of proof, and if you do false reports, then it can get your account in trouble.

There are a few different ways to file a DMCA complaint with Google, but we recommend using the one inside Google Search Console.

First, you’ll need to have your site linked with Google Search Console. If you haven’t done this yet, then see our guide on how to add your WordPress site to Google Search Console.

Then, you can use the Google Search Console Copyright Removal Tool.

Simply click ‘Create a new notice’.

This will bring up a screen where you can enter all of the relevant information including your contact information, what posts were stolen, and the location of the stolen material.

Google Search Console stolen content report

The more detailed information you’re able to provide, the better the chances of the offending site getting taken down.

If you need to gather more information for your complaint, then you can use a tool like Wayback Machine.

Wayback Machine compare content dates

This tool takes takes snapshots of your website at different points in time.

So, you can compare the date you published the article to the offending site who later stole your content.

5. Use an All in One Scanner and Takedown Tool

You can also use the Digital Millennium Copyright Act (DMCA) tool to help you find duplicate content across the web.

Just enter your URL into the tool and it’ll scour the web for sites that have stolen your content.

DMCA tool request takedown

Once you’ve found a site that plagiarized or stolen your content you can click ‘Launch Managed Takedown’ to start the takedown process.

Note that the results won’t always be stolen content. Sometimes it’ll be infographics, backlinks, unlinked brand mentions, and more.

The discovery and takedown process is similar to the tools above, but instead of having to use multiple tools, you can take care of everything in one place.

DMCA offers premium takedown tools and templates for $10 per month. Or, you can purchase a full service takedown for $199, where their team of experts will get your stolen content removed for you.

Final Thoughts on Dealing with Content Theft

Content theft is a real problem that every website owner deals with. Unfortunately the larger your website gets, the more people will copy you.

Some will do blatant content theft by using automated content scraping tools while others will take inspiration from your content and paraphrase.

As a website owner, it’s extremely frustrating to have your content stolen. We deal with this regularly on WPBeginner. The automated bot sites are easy enough to take down with DMCA complaints.

However since we’re the largest WordPress resource site, many other WordPress bloggers, theme companies, and even some hosting companies routinely copy our headline word-for-word. They may paraphrase the content to make it unique, but we know that inspiration was driven from our articles.

We take this imitation as a form of flattery, and it further validates that we’re continuing to lead in the right way.

If you have a competitor that’s always copying ideas from you, but it’s not blatant copy, then there’s not a lot you can do about it. Don’t let that bring you down, but rather continue to focus on your mission to serve your audience.

We hoped this article helped you learn how to find and remove stolen content in WordPress. You may also want to see our guide on how to prevent image theft in WordPress and learn how to trademark and copyright your blog’s name and logo.

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 Find and Remove Stolen Content in WordPress (5 Ways) appeared first on WPBeginner.


March 24, 2021 at 03:30PM

Tuesday, March 23, 2021

How to Disable Image Attachment Pages in WordPress

Do you want to disable image attachment pages in WordPress?

Image attachment pages can look like incomplete pages on your site. If a visitor views these, then it can leave a poor impression.

In this article, we’ll show you how to disable image attachment pages in WordPress and redirect it to the parent post.

How to disable image attachment pages in WordPress

Why Should You Disable Image Attachment Pages in WordPress?

By default, WordPress creates a single page for every media attachment you have on your site.

This includes images, audio/video files, pdfs, and more. Some users might find this functionality useful, however, most WordPress websites don’t need it.

For example, a photography theme could use the attachment page to display EXIF data. This could show the camera model used, the camera settings, and even the image’s location data.

Often we get complaints from users who accidentally linked their images to the attachment pages, and they don’t like the way it looks.

This is a big issue because many themes don’t have special templates for the image attachment pages.

Sometimes an image on your website can become popular, and people might start landing on the attachment page directly from Google.

Ideally, you want visitors to land on your post and see the image in the context you have used it.

This is why we always recommend users to disable image attachment pages on their WordPress blog.

How to Disable Image Attachment Pages in WordPress (2 Methods)

There are two ways to disable image attachment pages in WordPress.

The first approach uses WordPress plugins, while the second involves adding custom code to WordPress.

You’ll want to choose the method that’s best suited for your skills.

Method 1: Disable Image Attachment Pages in WordPress (with a Plugin)

The easiest way to disable image attachment pages is to use a WordPress plugin. This method is beginner friendly and requires no coding.

We recommend using All in One SEO. It’s the best SEO plugin for WordPress used by over 2 million sites.

The first thing you’ll need to do is install and activate the plugin. To do this, see our guide on how to install a WordPress plugin.

Once the plugin is installed and activated, you’ll have a new menu item called ‘All in One SEO’.

Navigate to All in One SEO » Search Appearance. Next, click the ‘Media’ navigation tab.

All in One SEO search appearance media setting

The first setting is ‘Redirect Attachment URLs’. You can disable the setting entirely, redirect to the attachment page, or the attachment parent page.

We recommend redirecting to the ‘Attachment Parent’ page. That way, when a user lands on the image attachment page, they’ll be redirected to your article instead.

All in One SEO select attachment parent

Once you select your preferred setting, make sure to click ‘Save Changes’ before exiting the screen.

If you aren’t using the All in One SEO plugin, you can still disable image attachment pages and redirect users to a parent post using a plugin called Attachment Pages Redirect.

All you have to do is install and activate the plugin. It’ll automatically start redirecting users that land on attachment pages to the parent post.

If no parent post is found, then users will be redirected to your homepage.

This plugin works out of the box and has no settings page. Simple and easy.

Method 2: Disable Image Attachment Pages in WordPress (with Code Snippet)

Another option is to add a code snippet to WordPress that accomplishes the same goal as the plugin above.

If you don’t want to use a plugin or feel that you’re already using too many WordPress plugins, then you can use this method.

First, you’ll need to create a new file in your WordPress theme folder and name it image.php. If your theme already has an image.php file, then you’ll need to edit that file instead.

After that, all you have to do is add the following code as the first line in your image.php file:

<?php wp_redirect(get_permalink($post->post_parent)); ?>

Next, you need to save the image.php file and upload it to your theme directory using FTP or your WordPress hosting control panel.

Now, when a user lands on your image attachment page, they’ll be redirected to the parent post.

We hope this article helped you disable image attachment pages in WordPress. You may also want to see our beginner’s guide to image SEO and our guide on how to fix common image issues 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 Disable Image Attachment Pages in WordPress appeared first on WPBeginner.


March 23, 2021 at 05:00PM