Sunday, 31 October 2021

How to Set oEmbed Max Width in WordPress (4 Easy Methods)

Do you want to limit the width of oEmbeds in WordPress?

WordPress automatically embeds third-party content like YouTube videos, Tweets, or Facebook posts. However, sometimes the embeds may get too wide and mess up your page layouts.

In this article, we’ll show you how to set oEmbed max-width in WordPress so you can have more control over your site layout.

Setting oEmbed maximum width in WordPress

Why Fix the OEmbed Maximum Width in WordPress?

WordPress allows you to automatically embed content from select third-party websites into your posts and pages using a technology called oEmbed.

This allows you to easily embed YouTube videos, Facebook posts, tweets, and many other types of content on your website. This content is not hosted on your WordPress website. Instead, it’s displayed directly from these third-party sites.

WordPress is quite good at automatically adjusting the width of the embedded content to your website’s content or sidebar areas.

However, sometimes these embedded content may be too wide and overlap your website’s content areas, like in the example below.

A WordPress embed overflowing the content width

To fix this, you’ll need to explicitly tell WordPress to use a maximum width limit for third-party embeds. Unfortunately, there is no option in WordPress settings to do that.

That being said, let’s take a look at how to easily set oEmbed max width in WordPress without breaking anything.

We’ll cover 4 different methods, and you can choose the one that best suits your needs:

  1. Set oEmbed width with WordPress shortcode
  2. Set oEmbed width with WordPress Embed Block
  3. Set oEmbed max width with CSS
  4. Set oEmbed max width with WordPress filter (Code Method)

Method 1. Use the Embed Shortcode in WordPress

This method is easier and works really well for setting a max width for video embeds in WordPress.

Instead of pasting the URL or using the YouTube block, you’ll use the shortcode block. Inside it, you need to use the embed shortcode and include width and height parameters.

[embed width="900" height="600"]https://youtu.be/6LwWumPeues[/embed]

Feel free to change the values of the width and height to your own requirements, and replace the embed URL to your own embed.

Embed shortcode width

You can now preview your post or page and see the embed in action.

oEmbed width adjusted

The embed shortcode and its width and height parameters don’t work for all oEmbed providers. For instance, you cannot use it to set the height and width of a Giphy embed in WordPress.

In that case, you can try one of the alternative methods mentioned below.

Method 2. Use Embed Blocks in WordPress

The default WordPress editor comes with several embed blocks for different oEmbed service providers. You can use them to embed content in different areas of your posts and pages.

Embed blocks in WordPress

Some of these blocks also allow you to change the alignment of the embed and set the content width to wide or full width.

Block width and alignment

You can try using these options to see if it fixes the maximum width issue for the embed.

Method 3. Use CSS to Set Max Width for Embeds in WordPress

By default, WordPress automatically adds CSS classes to different areas of your posts and pages.

It also adds several CSS classes to embed blocks. These CSS classes can be used to set a maximum width for embeds on your WordPress website.

To find out which CSS classes you need to target, simply embed content in a post or page, and then preview it in your browser. Right-click by taking the mouse over to the embedded content and then select the Inspect tool.

Finding CSS classes for embed blocks

You’ll be able to see all the CSS classes added to the embedded element. You can use these classes to set a maximum width for this type of embed.

For instance, if you wanted to set a maximum width for all embeds, then you can use the following custom CSS.

.wp-block-embed {
    max-width: 900px!important;
}

You can also target specific oEmbed providers by using the .wp-block-embed-providername class. For instance, if you wanted to set a maximum width for only Pinterest embeds, then you can use the following custom CSS.

.wp-block-embed-pinterest {
    max-width: 900px!important;
}

Method 4. Set oEmbed Max Width Using WordPress Filter

This last method requires you to add custom code to your WordPress website. If you haven’t done this before, then take a look at our guide on how to easily add custom code snippets in WordPress.

For this method, we will add our own code into WordPress to set the default width for oEmbeds. Simply add the following code to your theme’s functions.php file or the Code Snippets plugin.

add_filter( 'embed_defaults', 'wpbeginner_embed_defaults' );
 
function wpbeginner_embed_defaults() {
    return array(
        'width'  => 400, 
        'height' => 280
    );
}

Don’t forget to adjust the height and width attributes to your own requirement.

The problem with this method is that it only applies the width attribute if the embedded content doesn’t have ‘width’ defined. If the embed code already includes width, then this method may not work.

Bonus Tip

If you regularly embed content from social media platforms to your WordPress website, then you should start using Smash Balloon.

Smash Balloon

It is the best social media plugin for WordPress and allows you to easily embed custom social media feeds in WordPress.

It supports popular social media embeds like YouTube, Twitter, and more. It also allows you to embed Facebook and Instagram content, which is not supported by WordPress.

More importantly, all social media feeds are mobile responsive and work with any WordPress theme.

We hope this article helped you learn how to set an oEmbed max width in WordPress. You may also want to see our complete social media cheat sheet or our expert comparison of the best live chat software for small business.

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 Set oEmbed Max Width in WordPress (4 Easy Methods) appeared first on WPBeginner.



from WPBeginner https://ift.tt/3Cxe1we
More links is https://mwktutor.com

Saturday, 30 October 2021

How and Why You Should Limit Login Attempts in WordPress

Would you like to limit login attempts in WordPress?

Hackers may use a brute force attack to try to guess your admin password. If you limit the number of times they can attempt to log in, then you significantly reduce their chances of success.

In this article, we will show you how and why you should limit login attempts on your WordPress site.

How and Why You Should Limit Login Attempts in WordPress

Why Should You Limit Login Attempts in WordPress?

A brute force attack is a method that uses trial and error to hack into your WordPress website.

The most common type of brute force attack is password guessing. Hackers use automated software to keeping guessing your login information so they can gain access to your website.

By default, WordPress allows users to enter passwords as many times as they want. Hackers may try to exploit this by using scripts that enter different combinations until they guess the right login.

You can prevent brute force attacks by limiting the number of failed login attempts per user. For example, you could temporarily lock a user out after 5 failed login attempts.

Temporarily Lock Out a User After Failed Login Attempts

Unfortunately, some users find themselves locked out of their own WordPress website after typing their password incorrectly a number of times. If you find yourself in that situation, then you should follow the steps in our guide on how to unblock limit login attempts in WordPress.

With that being said, let’s take a look at how to limit login attempts on your WordPress website.

How to Limit Login Attempts in WordPress

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

The free version is all you need for this tutorial. Upon activation, you should visit the Settings » Limit Login Attempts page, and then click on the Settings tab at the top.

The default settings will work for most websites, but we’ll walk you through how you can customize the plugin settings for your site.

Limit Login Attempts Reloaded Settings

To be compliant with GDPR laws, you can click the ‘GDPR compliance’ checkbox to show a message on your login page. You can learn more about the GDPR in our guide on WordPress and GDPR compliance.

Next, you’ll choose whether to be notified when someone has been locked out. You can change the email address the notification is sent to if you wish. By default, you will be notified the third time the user is locked out.

After that, you should scroll down to the Local App section where you can define how many login attempts can be made and how long a user will have to wait before they can try again.

Limit Login Attempts Reloaded Settings

First, you need to define how many login attempts can be made. After that, choose how many minutes a user will have to wait if they exceed that number of failed attempts. The default value is 20 minutes.

You can also increase the wait time once the user has been locked out a specified number of times. For example, the default settings will not allow the user to attempt to log in for 24 hours once they have been locked out 4 times.

It’s recommended that you do not change the ‘Trusted IP Origins’ setting for security reasons.

Don’t forget to click the Save Settings button at the bottom of the screen to store your changes.

Pro Tips on How to Protect Your WordPress Website

Limiting login attempts is just one way to keep your WordPress site secure.

The first layer of protection to your WordPress sites is your passwords. You should always use strong passwords on your WordPress site.

Strong passwords can be difficult to remember, but you can use a password manager to make it easy. If you run a multi-author WordPress site, then see how you can force strong passwords on users in WordPress.

If your WordPress login page is still being attacked, then another layer of protection you can add is Google reCAPTCHA for WordPress login. This will further help reduce the DDoS attacks.

No website is 100% safe because hackers always find new ways to get around the system. That’s why it’s crucial that you keep complete backups of your WordPress site at all times. We recommend using the UpdraftPlus or another popular WordPress backup plugins.

If your website is a business, then we strongly recommend that you add a firewall that takes care of the brute force attacks and so much more. We use Sucuri, which guarantees our safety and if anything happens to our site, then their team is responsible to fix it at no additional charge.

For more security tips, be sure to see our ultimate WordPress security guide.

We hope this tutorial helped you learn how to limit login attempts in WordPress. You may also want to learn how to choose the best WordPress hosting or check out our list of must have plugins to grow your website.

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

The post How and Why You Should Limit Login Attempts in WordPress appeared first on WPBeginner.



from WPBeginner https://ift.tt/3ms98yK
More links is https://mwktutor.com

Friday, 29 October 2021

12 Tips to Optimize Your WordPress RSS Feed (Quick & Easy)

Do you want to optimize your RSS feed in WordPress?

Every WordPress site has an RSS feed by default. You can optimize this feed to protect your content, send more traffic to your site, and more.

In this article, we’ll show you how to optimize and customize your RSS feeds the right way.

12 tips to optimize your WordPress RSS feed

Why Optimize Your WordPress RSS Feeds?

RSS feeds offer a way for your readers to subscribe and read your blog posts in their favorite feed reader apps like Feedly.

Even though feed readers aren’t as popular as they once were, there are still many readers who prefer to read WordPress blog content this way.

By optimizing your RSS feed you can also prevent content scraping, get more backlinks, send traffic to your site, and more.

With that said, let’s get into our expert tips for optimizing your RSS feed.

1. Create an RSS Feed Sitemap

An RSS sitemap is different from an XML sitemap. RSS sitemaps only contain your most recent content, which helps Google to keep your content fresher in search results.

If you publish content frequently, then this can lead to a boost in your search engine rankings.

All in One SEO allows you to add an RSS sitemap to your website easily, without having to code.

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

Upon activation, you’ll be prompted to set up the plugin. You can follow the guided steps in the setup wizard, or see our guide on how to set up All in One SEO for WordPress.

AIOSEO enables RSS sitemaps automatically, so there’s nothing else you need to do.

If you’d like to double check, simply go to All in One SEO » Sitemap and then click on the ‘RSS Sitemap’ tab.

You can see that the ‘Enable Sitemap’ toggle in the ‘RSS Sitemap’ box is already enabled.

Enable RSS sitemap

You can also set the number of posts and the post types you want to include in the ‘Sitemap Settings’ box.

We’ll leave the default settings, but you can include more posts or only include certain post types.

Edit RSS sitemap settings

Before you leave the screen, make sure to click the ‘Save Changes’ button.

Now you’ve enabled your RSS sitemap for your website.

To submit your new RSS sitemap to Google, you can see our guide on how to add your WordPress site to Google Search Console. It’s the same process as submitting an XML sitemap.

2. Edit Your RSS Feed Before and After Content

By default, WordPress RSS feeds will show your recent post content, and there’s no built-in option to customize that content for your readers.

Luckily you can use the All in One SEO plugin to easily customize your RSS feed before and after content.

Simply follow the same steps as above to install, activate, and set up the plugin.

After that, navigate to All in One SEO » General Settings and then click the ‘RSS Content’ menu option.

Edit RSS content

On this screen, you can add any content you want to display before and after each post in your RSS feed.

You can add HTML, smart tags for links, and other metadata to each section.

Edit header and footer RSS content

Once you’re satisfied with your changes, make sure to click the ‘Save Changes’ button to save your RSS feed.

3. Protect Your RSS Feed From Content Scrapers

Content scraping is when content is taken your site, usually via your RSS feed, and republished on someone else’s site as their own.

It can be very frustrating to see someone stealing your content, monetizing it, and even outranking your website in the search results.

Luckily, you can customize your RSS feed to actually benefit your site if someone steals your content via your RSS feed.

For more details, see our beginner’s guide to preventing blog content scraping in WordPress.

4. Show Excerpt Instead of Full Article in RSS Feed

Showing your full article in the RSS feed lets your users read the entire article in their feed reader. This can negatively affect your page views, advertising revenue, and conversion rates.

By showing the article summary instead of the full article in your RSS feed, you require readers to come to your WordPress website to read the full post.

WordPress comes with a built-in solution. Simply go to Settings » Reading in your WordPress admin dashboard.

Then, scroll down to the section titled ‘For each post in a feed, include’ and select the ‘Excerpt’ radio button.

Show article excerpt in RSS feed

You can also control the number of posts that display in your RSS feed as well.

In the ‘Syndication feeds show the most recent’ box, simply enter a number into the box.

Before you leave this screen, make sure to click the ‘Save Changes’ button to update your RSS feed settings.

5. Add a Featured Image to Posts in RSS Feed

By default, WordPress doesn’t add your post featured images to your RSS feed. When your users read your post in a feed reader, it’ll often pull the first image in your post.

You can change this by adding code to your WordPress files. If you haven’t done this before, then see our beginner’s guide to pasting snippets from the web into WordPress.

All you need to do is add the following code to your functions.php file, in a site specific plugin, or by using a code snippets plugin.

function wpb_rsstutorial_featuredimage($content) {
global $post;
if(has_post_thumbnail($post->ID)) {
$content = '<p>' . get_the_post_thumbnail($post->ID) .
'</p>' . get_the_content();
}
return $content;
}
add_filter('the_excerpt_rss', 'wpb_rsstutorial_featuredimage');
add_filter('the_content_feed', 'wpb_rsstutorial_featuredimage');

This code simply adds your featured image inside a paragraph just before the post content.

6. Add Custom Post Types to Your RSS Feed

Many WordPress sites use custom post types to create separate sections from regular blog articles.

For example, here at WPBeginner, we created separate custom post types for our Deals and Glossary sections.

If you publish a lot of content using different custom post types, then you’ll want to add these to your main feed.

To do this, you’ll need to add the following code to your functions.php file, in a site specific plugin, or by using a code snippets plugin.

function myfeed_request($qv) {
        if (isset($qv['feed']) && !isset($qv['post_type']))
                $qv['post_type'] = array('post', 'books', 'movies');
        return $qv;
}
add_filter('request', 'myfeed_request');

This code adds two custom post types, ‘books’ and ‘movies’, to the main RSS feed. Make sure you replace these with your own custom post types.

7. Add Additional Text to Post Titles in RSS

Adding additional text to your post titles in RSS can be helpful if you create multiple kinds of post content.

For example, this can help your readers distinguish between guest posts, regular blog content, and sponsored content.

Here’s a code snippet you can use to display the post category in the title:

function wpb_rsstutorial_titlecat($content) {
$postcat = "";
foreach((get_the_category()) as $cat) {
$postcat .= ' ('.$cat->cat_name . ')';
}
$content = $content.$postcat;
return $content;
}
add_filter('the_title_rss', 'wpb_rsstutorial_titlecat');

For more details and examples, see our guide on how to completely customize your WordPress RSS feeds.

8. Allow Users to Subscribe to RSS Feed via Email

Not all your users want to use a feed reader to subscribe to your posts. A lot of people will prefer to subscribe by email instead. That’s one reason why having an email newsletter is important.

To send RSS emails automatically, we recommend using Sendinblue. It’s a popular email marketing service provider that has a forever free plan to send up to 300 emails a day.

Sendinblue

Once your email list is set up, you can automatically send RSS emails when you publish a new blog post.

For more details, see our guide on how to notify subscribers of new posts in WordPress.

9. Allow Users to Subscribe to Categories in RSS Feed

Each category on your WordPress site will automatically have its own RSS feed. If you run a massive blog with many diverse categories, then this lets your readers only subscribe to categories that interest them.

However, a lot of users don’t realize they can easily subscribe to specific categories. You can make this easier on your readers by highlighting this on your website.

Subscribe to category RSS

For more details, see our guide on how to make separate RSS feed for each category in WordPress.

10. Add Custom Field Data to Your RSS Feed

Custom fields let you add extra metadata to your WordPress posts and pages. However, this metadata isn’t included in your default RSS feed.

To display custom fields in your RSS feed, simply add the following code snippet to your functions.php file, in a site-specific plugin, or by using a code snippets plugin.

function wpb_rsstutorial_customfield($content) {
global $wp_query;
$postid = $wp_query->post->ID;
$custom_metadata = get_post_meta($postid, 'my_custom_field', true);
if(is_feed()) {
if($custom_metadata !== '') {
// Display custom field data below content
$content = $content."<br /><br /><div>".$custom_metadata."</div>
";
}
else {
$content = $content;
}
}
return $content;
}
add_filter('the_excerpt_rss', 'wpb_rsstutorial_customfield');
add_filter('the_content', 'wpb_rsstutorial_customfield');

This code checks if the custom field is being used and if the RSS feed is being displayed. After that, it will add the custom field data below the post content.

11. Delay Posts From Appearing in RSS Feed

Delaying posts from appearing in your RSS feed can save you from accidental publishing and can help you beat content scrapers, if that’s an issue you regularly face.

When you delay posts from appearing in your RSS feed, you give the search engines time to crawl and index your content before it appears elsewhere.

Plus, you can check for any typos before it gets sent out to RSS subscribers.

To do this, you’ll need to add the following code to your functions.php file, in a site-specific plugin, or by using a code snippets plugin.

function publish_later_on_feed($where) {

        global $wpdb;

        if ( is_feed() ) {
                // timestamp in WP-format
                $now = gmdate('Y-m-d H:i:s');

                // value for wait; + device
                $wait = '10'; // integer

                // http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_timestampdiff
                $device = 'MINUTE'; //MINUTE, HOUR, DAY, WEEK, MONTH, YEAR

                // add SQL-sytax to default $where
                $where .= " AND TIMESTAMPDIFF($device, $wpdb->posts.post_date_gmt, '$now') > $wait ";
        }
        return $where;
}

add_filter('posts_where', 'publish_later_on_feed');

This code will add a 10 minute delay before posts appear in your RSS feed. You can change it to your own needs by changing the 10 and MINUTE values.

12. Add Social Buttons to Your WordPress RSS Feeds

Most RSS feed readers don’t have social sharing features, or they’re not very noticeable. However, you can add your own social media icons to your RSS feed to encourage sharing.

First, you’ll need to create image icons for the social media networks you want to add. For this tutorial, we created images for Facebook and Twitter and uploaded them by going to Media » Add New.

After you upload your image files, you need to copy the ‘File URL’ and paste it into your favorite text editor to save it for the next step.

For more details, see our guide on how to get the URL of images you upload in WordPress.

Upload social media icons copy URL

Next, you need to add the following code snippet to your functions.php file, in a site-specific plugin, or by using a code snippets plugin.

// add custom feed content
function wpb_add_feed_content($content) {

// Check if a feed is requested
if(is_feed()) {

// Encoding post link for sharing
$permalink_encoded = urlencode(get_permalink());

// Getting post title for the tweet
$post_title = get_the_title(); 

// Content you want to display below each post
// This is where we will add our icons

$content .= '<p>
<a href="http://www.facebook.com/sharer/sharer.php?u=' . $permalink_encoded . '" title="Share on Facebook"><img src="Facebook icon file url goes here" title="Share on Facebook" alt="Share on Facebook" width="64px" height="64px" /></a>

<a href="http://www.twitter.com/share?&text='. $post_title . '&amp;url=' . $permalink_encoded . '" title="Share on Twitter"><img src="Facebook icon file url goes here" title="Share on Twitter" alt="Share on Twitter" width="64px" height="64px" /></a>
</p>';
}

return $content;
}

add_filter('the_excerpt_rss', 'wpb_add_feed_content');
add_filter('the_content', 'wpb_add_feed_content');

This code above will simply add the social sharing buttons for Twitter and Facebook. You need to replace the src= attribute in the image tag with your own image URLs that you pasted into your text editor earlier.

If you’ve optimized your RSS feed and are seeing errors, then see our guide on how to fix RSS feed errors.

We hope this article helped you learn how to optimize your WordPress RSS feed. You may also want to see our expert picks on the best email marketing services for small businesses and our guide on how to choose the best website builder.

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 12 Tips to Optimize Your WordPress RSS Feed (Quick & Easy) appeared first on WPBeginner.



from WPBeginner https://ift.tt/2M4dTJD
More links is https://mwktutor.com

Thursday, 28 October 2021

How to Allow Users to Choose a Payment Method on WordPress Forms

Do you want to allow users to choose between different payment methods on a WordPress form?

When you allow your customers to choose their preferred payment method, you’ll build trust and increase conversions on your website.

In this article, we’ll show you how to allow your users to choose a payment method in your WordPress forms.

How to Allow Users to Choose a Payment Method on Your WordPress Form

Why Offer Multiple Payment Methods in WordPress?

PayPal and credit cards are two popular ways to pay for online purchases. Each has its pros and cons, and your visitors are likely to already have a preference for one or the other.

So, if you’re selling products or services on your WordPress website, or asking for donations, then it is important to allow your visitors to use their preferred payment method.

You don’t need to set up a complete online store with a shopping cart to accept online payments. All you need is a simple online order form with a choice of payment options.

This makes a lot of sense, especially if you’re selling a single product, accepting payments for services, or raising money for a cause or charity.

You will need to enable HTTPS/SSL on your website so that you can accept payments securely. For more details, you can follow our guide on how to get a free SSL certificate for your WordPress site.

That being said, let’s look at how you can offer multiple payment options on your website.

How to Setup a Payment Form in WordPress

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

WPForms is the best drag and drop form builder plugin for WordPress. It lets you create a simple order form or donation form without the hassle of a full-fledged eCommerce platform or shopping cart plugin.

While they have a Lite version that’s free, you will need their Pro plan to access the payment addons and order form template.

Upon activation, you need to visit the WPForms » Settings page to enter your license key. You can find this information in your WPForms account area.

Connecting Payment Platforms to WPForms

Next, we’ll connect WPForms with the payment platforms you plan to use. To do this, you need to head over to WPForms » Addons and install the payment addons.

Once there, you need to scroll down to the PayPal Standard Addon and then click on its Install Addon button.

Scroll Down to the PayPal Standard Addon and Click Its 'Install Addon' Button

You’ll see a message saying that the addon has been installed and activated, and the text on the button will change to Deactivate.

We’ll set up your PayPal account details later in the tutorial.

You’ll also need to install an addon for accepting credit card payments. WPForms supports Stripe, Square and Authorize.net. For this tutorial, we’ll set up Stripe, but the steps for setting up the other two platforms are similar.

You’ll need to scroll to the Stripe Addon and click on the Install Addon button.

Click on the Install Addon Button

Once the addons have been installed and activated, you’ll need to connect WPForms to your Stripe account.

To do that, head over to WPForms » Settings page and click on the ‘Payments’ tab. After that, you will need to connect your Stripe account by clicking the ‘Connect with Stripe’ button.

Click the Connect with Stripe Button

On the next screen, you can enter your Stripe email address and click the ‘Next’ button.

Enter Your Stripe Email Address

Once that is done, Stripe will now ask for your password so that it can log in to your account.

After logging in, you can select your Stripe account and then click the ‘Connect’ button.

Select Your Website and Connect It with Stripe

Next, you will be redirected back to the WPForms Payments settings tab. To make sure that your account is successfully connected, you can go to the Connection Status settings under Stripe settings.

When you see a green tick mark, it means your Stripe account is now live with WPForms. Go ahead and click the ‘Save’ button to store your settings.

Successfully Connected Your Stripe Account

WPForms is now ready to accept credit card payments.

Creating an Order Form with Multiple Payment Methods

Now we’ll create an online order form that can accept both PayPal and credit card payments.

To start, head over to WPForms » Add New page. From here, you need to provide a title for your form and then select the ‘Billing / Order Form’ template.

Select the ‘Billing / Order Form’ Template

WPForms will pre-load the form builder with a simple order form with commonly used fields. You can edit any field by clicking it.

WPForms Will Pre-load the Form Builder with a Simple Order Form

You can add new fields from the left column using drag and drop. You’ll need to drag a Multiple Choice field onto the form to allow your customers to select from multiple payment options.

Add a Multiple Choice Field

After that, you should drag the Stripe Credit Card field onto the form just underneath the Multiple Choice field.

Add a Stripe Credit Card Field

Next, you need to change the options on the Multiple Choice field to match the payment methods you are offering.

Start by giving the field the label Payment Method. After that, you should name the first two choices PayPal and Credit Card.

Multiple Choice Field Options

You can simply remove the third choice by clicking the red minus button.

After that, you need to switch the Required option on. This will make sure that users select a payment method before they submit the order form.

Now we need to set up the Stripe Credit Card field, so it is hidden until a user selects it as their payment option. We can achieve that by using WPForms’ conditional logic feature.

You’ll need to click on the Stripe field so that you can edit it. Next, you should click on the Smart Logic tab and then enable conditional logic by clicking the toggle switch to the on position.

Click on the Smart Logic Tab and Enable Conditional Logic

You will now see some additional options that allow you to set up rules for the field. You need to make sure that the first option is selected to ‘Show’ and then use the drop down menus so that the remaining fields say ‘Payment is Credit Card’.

Set up Some Rules for the Field

Now the Stripe Credit Card field will only be shown after a user selects Credit Card from the Payment Method field.

Enabling Payment Methods for the Order Form

The next step is to enable PayPal and Stripe payments for the order form.

You should first navigate to Payments » PayPal Standard in the WPForms form builder. Once there, you should check the ‘Enable PayPal Standard payments’ box in the right panel.

Check the ‘Enable PayPal Standard Payments’ Box

After that, you should fill in the rest of the fields. Type in your PayPal email address and place the account in Production mode. You also need to configure whether users need to supply a shipping address.

Toggle the Enable Conditional Logic Option

After that, you need to scroll down to the Enable Conditional Logic option and toggle it to the ON position. This will reveal more settings.

Toggle the Enable Conditional Logic Option

You should set the rule to Process the charge if the Payment Method is PayPal.

Next, you need to click on the Stripe section of the Payments tab and then check the ‘Enable Stripe payments’ box.

Check the ‘Enable Stripe Payments’ Box

You can add a payments description and opt to email a receipt if you wish. After that, you need to switch the Enable Conditional Logic toggle to the on position so that you can create a rule for this payment option.

Toggle the Enable Condition Logic Option

You need to configure the rule to read Process this charge if the Payment Method is Credit Card.

If you’d like to accept recurring subscription payments by credit card, then you can scroll down to the Subscription section and configure it.

Stripe Subscriptions

Once you are done, you need to click on the Save button at the top and exit the form builder.

Adding the Order Form to Your WordPress Site

Your online order form with multiple payment options is now ready, and you can add it to any WordPress page on your site.

To add your form, simply edit a post or page or create a new one. Then, click on the plus + sign on the right of the page and add a WPForms block in your WordPress editor.

Add a WPForms Block

After that, you need to click on the dropdown menu in WPForms block and select your order form.

Select Your Order Form from the Dropdown Menu

You can now save or publish your page and click on the preview button to see your form in action.

Preview Order Form

We hope this tutorial helped you learn how to allow users to choose a payment method on your WordPress form.

You may also want to see our expert pick of the best virtual business phone number apps for small businesses, and our step by step guide on how to create a business email address.

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 Allow Users to Choose a Payment Method on WordPress Forms appeared first on WPBeginner.



from WPBeginner https://ift.tt/3BpwdX4
More links is https://mwktutor.com

Wednesday, 27 October 2021

How to Add Rotating Testimonials in WordPress (3 Ways)

Do you want to add rotating testimonials to your WordPress website?

Displaying testimonials is a great way to show social proof and boost credibility. That’s why so many online businesses proudly display customer testimonials across their websites.

In this article, we’ll show you how to easily add rotating testimonials in WordPress.

How to add rotating testimonials in WordPress (3 ways)

Why Add Rotating Testimonials to WordPress?

Displaying rotating testimonials in WordPress is an easy way to add social proof to your site to help you win new customers and boost sales.

If you’re running an online store, then you can use social proof and testimonials to boost your conversion rate.

Rotating testimonials are beneficial because they let you showcase a handful of testimonials in a small space. Plus, this style of testimonial can be very eye catching and appealing to your visitors.

You can also use testimonials to encourage downloads, email list sign ups, sales, and more.

With that said, let’s show you how you can add rotating testimonials to WordPress using a few different methods. Simply use the quick links below to jump to the method you want to use.

Method 1. Adding Rotating Testimonials to WordPress Using WP Testimonials Rotator

WP Testimonials Rotator is a simple free plugin that lets you add rotating testimonials to your website.

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

Upon activation, you need to visit WP Testimonials » Add New in your WordPress admin panel. From here, you can enter your testimonial details in the page editor screen.

WP Testimonials Rotator add new testimonial

Once you’ve added the testimonial quote, you can scroll down beneath the post editor to the ‘Testimonials Details’ box to add more details.

Here you can enter your client name, job title, company, and include a URL to their website.

Add more testimonial details

Once you’re finished, make sure to click the ‘Publish’ button to save your changes.

In order for your testimonials to rotate, you’ll need to add more than one.

To do this, simply go back to WP Testimonials » Add New and then follow the same steps as above to add another testimonial.

After you’ve added all your testimonials, you’ll be able to add them to your site on a page or post.

Simply open up the page where you want to add your rotating testimonials.

Then, click the ‘Plus’ add block icon to bring up the block editor.

Add new block for testimonials

Next, search for ‘Shortcode’ in the search box.

Then, select the ‘Shortcode’ block.

Select shortcode block

After that, you’ll need to add the following shortcode to the box.

[sp_testimonials_slider]

Then, click the ‘Update’ or ‘Publish’ button to save your changes.

Save testimonial shortcode

Now your visitors can see your live rotating testimonials on your website.

Your testimonials will automatically rotate after each one displays for a few seconds.

Testimonials rotate example

Method 2. Adding Custom Rotating Testimonials to WordPress Using SeedProd

SeedProd is one of the best drag and drop WordPress page builders in the market used by over 1 million websites.

It lets you quickly create custom pages in WordPress and easily add rotating testimonials to your website.

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

Note: There is a free version of SeedProd available, but we’ll be using the Pro version since it has the testimonial block we need.

Upon activation, you need to visit SeedProd » Settings and enter your license key.

Enter SeedProd license key

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

After that, you need to go to SeedProd » Pages and then click on the ‘Add New Landing Page’ button.

Add new SeedProd landing page

On the next screen, you’ll be asked to choose a template. SeedProd has dozens of professionally designed templates to choose from.

To choose a template, hover over it and click the ‘Checkmark’ icon.

Select SeedProd template for testimonials

We’ll be using the ‘Lead Thank You Page’ template, but you can choose any template you like.

Next, you’ll be asked to give your page a name and then click the ‘Save and Start Editing the Page’ button.

Name page and start editing

This will launch the drag and drop builder interface.

You’ll see a live preview of the template you selected, where you can point and click to select and edit any item on the screen.

Drag and drop builder example

The left hand column has blocks that you can add to your page.

First, we’ll add a customer testimonial block. Simply drag the ‘Testimonial’ block onto the page where you want it to be displayed.

Add testimonial block

You can completely customize the testimonial, add an image, and change the testimonial text.

Once you click on the testimonial block, you can change all of the display options in the left hand menu. For example, you can change the style of the text, add links, and more.

Edit testimonial block settings

To add multiple testimonials, simply click the ‘Add Testimonial’ button in the left hand menu.

This will automatically create a rotating block of customer testimonials.

Add new testimonial

Next, you can adjust how the rotating testimonials will display.

Simply click the ‘Carousel Settings’ menu option. Here you can change the color scheme, slider speed, and more.

Change carousel display settings

You can continue to customize your page by adding more blocks and adjusting the settings menu.

Once you’re finished customizing your page, make sure you click ‘Save’ and then ‘Publish’ from the drop down menu to make your rotating testimonials page live.

Save and publish testimonial page

Method 3. Adding Rotating Social Media Testimonials to WordPress Using Smash Balloon

Smash Balloon is one of the best WordPress testimonial plugins in the market used by over 1.6 million websites.

It’s a collection of social media plugins, so you can decide which social media testimonials you want to add to WordPress.

This can be a great option if your visitors are already leaving fantastic reviews on Facebook and Twitter. You don’t have to copy and paste new testimonials to your WordPress website since they’ll show up automatically.

Smash Balloon

If you want to add a rotating Twitter testimonials, then see our guide on how to embed tweets in WordPress. For Facebook, see our guide on how to create a custom Facebook feed in WordPress.

Once you activate, set up, and connect your social media accounts, your social media testimonials will automatically update when new reviews are posted.

Smash Balloon also has plenty of options for filtering and moderating which reviews show up on your website, so you still have complete control.

We hope this article helped you add rotating testimonials to your WordPress website. You may also want to see our expert picks of the best virtual business phone number apps and our beginner’s guide on how to move WordPress from HTTP to HTTPS.

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 Rotating Testimonials in WordPress (3 Ways) appeared first on WPBeginner.



from WPBeginner https://ift.tt/33TLbnI
More links is https://mwktutor.com