Should You White Label Reputation Management? It Depends

Category Image 006

White label reputation management involves offering reputation management services under the name of another agency. An example would be a digital marketing agency that doesn’t specialize in reputation management entering a white label agreement with a specialist reputation management agency to deliver services on its behalf.  In some cases, certain […]

The post Should You White Label Reputation Management? It Depends appeared first on .

How to Limit Comment Length in WordPress (Easy Tutorial)

Category Image 098

Do you want to limit comment length in WordPress?

WordPress comments encourage discussions around your blog post content. However, you may find that comments that are very brief or overly long are not very helpful.

In this article, we will show you how to easily limit comment length in WordPress.

Limit Comment Length in WordPress

Why Limit Comment Length in WordPress?

An active comment area is a great way to build a community around your WordPress blog. Visitors can give feedback, ask questions, and offer their own points of view on the topic.

However, not all comments are helpful.

We’ve been moderating WordPress comments for well over a decade. In our experience, we’ve found that the most helpful comments are above 60 characters and below 5000 characters in length.

One-word comments are usually not very helpful. In most cases, they are spam comments where the author just wants a backlink from your site.

On the other hand, long comments above 5,000 characters are often rants or complaints. Sometimes, they are not even relevant to the article.

Setting comment length limits in WordPress can improve the overall quality of your comments and discourage spam comments. However, there is no built-in way of doing this in WordPress.

That being said, let’s take a look at how to control comment length in WordPress by setting minimum and maximum limits.

How to Limit Comment Length in WordPress

You can limit comment length in WordPress by adding code to your functions.php file. However, keep in mind that the smallest error while entering the code can break your site and make it inaccessible.

That’s why we recommend always using WPCode to insert code snippets into your WordPress site. It is the best WordPress code snippets plugin on the market that makes it safe and easy to add custom code.

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

Note: WPCode also has a free version that you can use for this tutorial. However, upgrading to the paid plan will give you access to more features like a larger code snippets library, conditional logic, and more.

Upon activation, visit the Code Snippets » + Add Snippet page from the WordPress admin sidebar.

Here, click the ‘Use Snippet’ button under the ‘Add Your Custom Code (New Snippet)’ option.

Add new snippet

This will take you to the ‘Create Custom Snippet’ page, where you can start by adding a title for your code snippet. This name won’t be displayed on the website front end and can be anything you like.

Next, choose the ‘PHP Snippet’ option as the Code Type from the dropdown menu in the right corner of the screen.

Choose the PHP Snippet option for comment length limit

Once you have done that, simply copy and paste the following code snippet into the ‘Code Preview’ box:

add_filter( 'preprocess_comment', 'wpb_preprocess_comment' );
 
function wpb_preprocess_comment($comment) {
    if ( strlen( $comment['comment_content'] ) > 5000 ) {
        wp_die('Comment is too long. Please keep your comment under 5000 characters.');
    }
if ( strlen( $comment['comment_content'] ) < 60 ) {
        wp_die('Comment is too short. Please use at least 60 characters.');
    }
    return $comment;
}

This code snippet works by adding a filter hook to preprocess_comment. This filter is run before WordPress saves any comments to the database or performs any pre-processing on submitted comments.

It checks the comment length and displays an error message if it is too short or too long. By default, the comment limit is set to a minimum of 60 characters and a maximum of 5,000 characters in this snippet.

However, to set your own comment limit, just replace the number 5,000 in the code with your maximum limit number.

Similarly, you can replace the number 60 in the code to set a different minimum comment limit on your WordPress website.

You can also change the message that will be displayed on your website when a user exceeds or falls short of the comment limit. Simply type the sentence you want to display after the wp_die lines in the code.

Edit comment limit snippet

After that, scroll down to the ‘Insertion’ section and choose the ‘Auto Insert’ mode.

The custom code will be automatically executed on your website upon activation.

Choose an insertion method

If you only want to limit comment length on specific website pages, then you can also do that.

Simply scroll down to the ‘Conditional Logic’ section and toggle the ‘Enable Logic’ switch.

After that, choose the ‘Show’ option from the ‘Conditions’ dropdown menu and click the ‘+ Add new group’ button.

Enable the Conditional Logic toggle

This will open a new tab where you must select the ‘Page URL’ option from the dropdown menu on the left.

Next, type the URL of the page where you want to limit the comment length in the field on the right.

Now, the code snippet will only be activated on the page with the URL you have just entered.

Type the conditional logic

Scroll back to the top of the page and toggle the ‘Inactive’ switch to ‘Active’.

Finally, click the ‘Save Snippet’ button to store your settings.

Save the comment limit snippet

Now, when a user types a comment that falls short of your minimum comment length, this message will be displayed on their screens.

Users won’t be able to post a comment until it is at least the minimum length you chose.

An Error Message Is Displayed if a Comment is Too Short or Too Long

Similarly, when a user types a comment that exceeds your maximum limit, this message will be show on their screens.

This will help reduce rants and spam comments on your website.

Message preview for a long comment

Bonus: Improve Comment Engagement on Your WordPress Site

Controlling comment length is just one way to increase engagement in your WordPress comments section. This is great for keeping visitors on your site for longer and can even benefit your site’s SEO when users’ comments contain relevant keywords and add context to your content.

You can also easily further improve the comments section on your website using Thrive Comments.

The Thrive Comments WordPress plugin

It is the best WordPress comments plugin that comes with a dedicated moderation board, lets you lazy load comments, allows users to leave comments with their social media profiles, and more.

Plus, the tool enables you to add an upvote/downvote functionality to reduce spam and encourage interesting comments on your website.

Thrive Comments even lets you feature encouraging comments at the top and bury offensive or irrelevant comments at the bottom of the discussion section.

Feature comment from dropdown menu

This allows you to reward users who are adding the most value to the discussion while politely discouraging other users from leaving unhelpful comments.

For detailed instructions, you may want to see our tutorial on how to feature or bury comments in WordPress.

We hope this tutorial helped you learn how to limit comment length in WordPress. You may also want to learn how to increase your blog traffic or check out our list of the best WordPress plugins to grow your site.

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

The post How to Limit Comment Length in WordPress (Easy Tutorial) first appeared on WPBeginner.

Who Should Use Reputation Management (+Getting Started)

Category Image 006

Reputation management involves monitoring and influencing your reputation with the goal of both protecting and enhancing it. Given that negative press can spread quickly through news, social media, and other digital outlets, this practice has arguably never been more important than it is today.  What Reputation Management Includes Here are […]

The post Who Should Use Reputation Management (+Getting Started) appeared first on .

Best Practices for Building SEO-Friendly Websites with Laravel

Featured Imgs 23

Before diving into best practices, let’s quickly revisit why Laravel is a preferred framework for website development. Laravel offers: Laravel Best Practices for SEO-Friendly Websites Conclusion: Mastering Laravel entails not only understanding its core concepts and features but also adhering to best practices for building SEO-friendly websites. By following the guidelines outlined in this blog, …

The post Best Practices for Building SEO-Friendly Websites with Laravel first appeared on Lucid Softech.

Chris’ Corner: Things I Like

Category Image 052

I like Melanie Sumner’s coining of the phrase Continuous Accessibility. To me, it’s like a play on the term Continuous Integration (CI) that is very pervasive. We build CI pipelines to lint our code, test our code, and test our code primarily, but all sorts of things can be done. We can test new code for performance regressions for example. So too could and should we be testing our new code for accessibility issues. Continuously, as it were. I’m very guilty of failing at the continuous part. I care about and act on accessibility issues, but I tend to do it in waves or sprints rather than all the time.


I like the career value that Ben Nadel assigns to learning RegEx. He says not a day goes by he doesn’t use them in some form (!). I wouldn’t say that’s true for me, but certainly every week or two I need to think about them, and over the years, my fear-factor in using them has scaled down to zero. They really aren’t that bad, it’s just a long steady learning curve to the point where eventually you feel like even if I’m slow I can ultimately reason this out. Either figuring out an existing one or writing a new one. Ben doesn’t just talk about it abstractly, he lists loads of practical examples.

Before I move on, allow me to show you Hillel Wayne agreeing with Regexes are Cool and Good (that’s my kind of title). Hillel mentions some valid reasons why people have a distaste for them, but then brings up a super good point: RegExes are particularly good when you’ve got some muscle memory for them and use them in little one-off use cases.

… where regex really shines is in interactive use. When you’re trying to substitute in a single file you have open, or grep a folder, things like that. Readability doesn’t matter because you’re writing a one-off throwaway, and fragility is fine because you’re a human-in-the-loop. If anything goes wrong you will see that and tweak the regex.

Heck yeah. If you get good at it, using them for Find/Replace reasons in your code editor can make you look like damn superhero.

Oh and thank heavens for RegEx101 and sites like it. So good.


I really like the CSS only “scroll-to-top” trick that David Darnes created and Stefan Judis wrote up. It’s just so deliciously clever. A scroll-to-top link is just a UX convenience and accessibility feature, as it not only scrolls to the top but moves focus back up there as well. It’s like…

<a href="#top" class="back-to-top-link">Back to Top</a>

But where and when do you show it? It could just be down in the footer of a site. But a classy way to do it is to show it on long-scrolling pages pretty much all the time — just not when the page is already scrolled to the top. Say you want to wait until the user has scrolled down at least 200px or something like that. Feels like JavaScript territory, but no, that’s where David’s trick shines: this can all be done in CSS.

The bare-bones part of the trick:

.back-to-top-link {
  margin-block-start: calc(100vh + 200px);
  position: sticky;
  bottom: 1rem;
  left: 1rem;
}

Here’s a demo.


I like the relative color syntax. Support for it is coming along and it’s in Interop 2024 so “actually using it” isn’t terribly far away. What I like is that it allows you to manipulate a color on the fly in a way that will actually work well without needing anything other than native CSS.

Thought process:

  • I’ve got this orange color
  • I wish I had a version of it that was a bit darker
  • … and is a bit alpha transparent.

So I’ve got the color:

body {
  --color: #f06d06;
}

Then I can use it, and I can use my modified version easily.

.box {
  background: var(--color);
  border: 20px solid oklch(from var(--color) calc(l - 0.5) c h / 0.5);
}

I’m using OKLCH there because it has “perceptually uniform lightness” so if I manipulate all my colors the same amount, they will feel the same amount manipulated. I don’t have to use that function, I could use rgb() or hsl() or even the generic color(). That’s the thing with the relative color syntax, it’s not any particular function, it’s largely that from keyword.


I like the idea of things challenging the dominance of npm. Much like Deno is challenging Node, and is literally from the same creator, now vlt is challenging npm and is from the same creator. Well, he’s on the team anyway. I remember listening to Darcy Clarke on Syntax saying some smart stuff about this new package manager possibility. Like, I’m the user, right? It’s my computer, and I’m asking this tool to go get a package for me. Why can’t I say “don’t get the README though, I don’t need it, and definitely skip the 1.5 MB JPG in that README, I just need the JavaScript file.” Makes a lot of sense to me. Give me a pre-built version! Don’t give me the types, I’m not using TypeScript. That kind of thing. I’m sure that like 1% of what this thing will be able to do, I just like the fresh thinking. I’m sure it’s more about the security. We’ve got JSR in there shaking stuff up now too, which I like because it isn’t friggin lowecase.

HTML popover Attribute

Featured Imgs 23

Modals have been an important part of websites for two decades. Stacking contents and using fetch to accomplish tasks are a great way to improve UX on both desktop and mobile. Unfortunately most developers don’t know that the HTML and JavaScript specs have implemented a native modal system via the popover attribute — let’s check it out!

The HTML

Creating a native HTML modal consists of using the popovertarget attribute as the trigger and the popover attribute, paired with an id, to identify the content element:

<!-- 
  "popovertarget" attribute will map to "id" of popover contents
-->
<button popovertarget="popover-contents">Open popover</button>
<div id="popover-contents" popover>This is the contents of the popover</div>

Upon clicking the button, the popover will open. The popover, however, will not have a traditional background layer color so we’ll need to implement that on our own with some CSS magic.

The CSS

Styling the contents of the popover content is pretty standard but we can use the browser stylesheet selector’s pseudo-selector to style the “background” of the modal:

/* contents of the popover */
[popover] {
  background: lightblue;
  padding: 20px;
}

/* the dialog's "modal" background */
[popover]:-internal-popover-in-top-layer::backdrop {
  background: rgba(0, 0, 0, .5);  
}

:-internal-popover-in-top-layer::backdrop represents the “background” of the modal. Traditionally that UI has been an element with opacity such to show the stacking relationship.

The post HTML popover Attribute appeared first on David Walsh Blog.

How to Create a “Sticky” Floating Footer Bar in WordPress

Category Image 091

Are you looking for a way to create a sticky floating footer bar in WordPress?

A sticky floating footer bar stays visible on your website even when users scroll down on your page. It can help you promote discount offers or social media handles, which can reduce the bounce rate and get more conversions.

In this article, we will show you how to easily create a sticky floating footer bar in WordPress, step by step.

Create a "Sticky" Floating Footer Bar in WordPress

What Is a Floating Footer Bar in WordPress?

A sticky floating footer bar allows you to prominently display important content and news to users.

This bar remains visible to visitors at all times, so they are more likely to click on it and discover more useful content.

WPForms floating footer bar preview

You can use the floating footer bar to:

  • Drive more clicks to other blog posts.
  • Generate leads and build your email list.
  • Bring attention to special coupons or discount offers/sales.
  • Promote your social media accounts.
  • Build brand recognition.
  • Provide access to important resources on your WordPress website.

Having said that, let’s see how to easily create a sticky floating footer bar in WordPress. We will show you two methods in this tutorial, and you can use the links below to jump to the method of your choice:

You can easily create a sticky floating footer bar with OptinMonster. It is the best lead generation and conversion optimization tool on the market that makes it super easy to convert your website visitors into subscribers.

OptinMonster comes with a drag-and-drop builder and premade templates that allow you to create a floating footer bar, slide-in popups, and banners without using any code.

We recommend this method because OptinMonster is super easy to use and offers more customization options than the free plugin method.

Step 1: Install OptinMonster on Your Website

First, you will need to sign up on the OptinMonster website by clicking on the ‘Get OptinMonster Now’ button.

The OptinMonster lead generation tool

Next, you must install and activate the free OptinMonster connector plugin on your website. For more instructions, see our beginner’s guide on how to install a WordPress plugin.

Upon activation, the OptinMonster setup wizard will open up on your screen, where you have to click the ‘Connect Your Existing Account’ button. This will connect your WordPress site with your OptinMonster account.

Connect your existing account

Once you do that, a new window will open up on your screen.

Here, click the ‘Connect to WordPress’ button to move ahead.

Connect OptinMonster to WordPress

Step 2: Create And Customize the Floating Sticky Footer Bar

Now that you have connected OptinMonster with your website, it’s time to create a sticky floating footer bar.

To do this, you need to visit the OptinMonster » Templates page from the WordPress admin sidebar and select ‘Floating Bar’ as the campaign type.

Once you do that, all the premade templates for the floating bar will load on the screen. From here, you can click the ‘Use Template’ button on the one you want to use.

Choose a premade template for a floating sticky footer bar

This will open the ‘Create Campaign’ prompt on the screen, where you can add a name for the floating footer bar that you are about to create. It can be anything you like, as the name won’t be displayed to your visitors.

After that, just click the ‘Start Building’ button.

Add a name for your floating sticky footer bar

OptinMonster’s drag-and-drop builder will now be launched on your screen, where you can start customizing your floating footer bar. Here, you will notice a floating bar preview on the right with blocks in the left column.

For example, you can use a countdown timer block if your floating footer bar is promoting a discount offer. This will help create a sense of urgency among users and encourage them to take action.

You can also add a CTA, video, or social media block to the footer bar. For detailed instructions, you can see our tutorial on how to create an alert bar in WordPress.

Add blocks to customize your floating footer bar

You can also edit text on the footer bar by clicking on it. This will open the block settings in the left column, where you can adjust them according to your liking.

For example, if you want to change the discount offer in the template, then you can change the button text. After that, you can select the ‘Redirect to a URL’ option and add the page link that you want users to be directed to upon clicking on the button.

Change button text in the footer bar

Step 3: Configure The Display Rules For Your Floating Footer Bar

Once you are satisfied with your footer bar’s customization, just switch to the ‘Display Rules’ tab from the top.

Here, you can configure when to display the bar on your page. If you want to display the floating footer bar at all times, then you must select the ‘time on page’ option from the left dropdown menu.

After that, choose the ‘is immediate’ option from the dropdown menu on the right.

Configure display rules to display the floating footer bar at all times

However, to display the floating footer bar on a specific page, you must select the ‘Page Targeting’ option from the right dropdown menu.

After that, choose the ‘exactly matches’ option from the dropdown menu in the middle and then add a page URL. Once you do that, the floating footer bar will only displayed on the page you chose.

Configure page targeting for floating footer bar

Additionally, you can select the ‘Exit Intent’ option to show the sticky floating footer bar when the user is about to leave your site. You can then configure the exit intent sensitivity and choose the devices where the footer bar will be displayed. This can be handy if you want to reduce your bounce rate.

You can even select the ‘Visitor’s Device’ option if you only want to display the floating footer bar to desktop visitors.

Configure exit intent technology for footer bar

You can also configure the display rules according to the date, time, or scroll distance by selecting the ‘When’ option from the left column.

For an explanation of more display rule options, you can see our complete OptinMonster review.

Step 4: Publish Your Floating Footer Bar

Once you have defined the display conditions for your footer bar, switch to the ‘Publish’ tab from the top.

Here, simply click the ‘Publish’ button.

Publish floating footer bar

After that, don’t forget to click on ‘Save’ to make your changes live.

Now, you can visit your WordPress blog to see the sticky floating footer bar in action.

Sticky floating footer bar preview

Alternative: You can also use Thrive Ultimatum to show a countdown timer floating footer bar on your website. For more details, see our Thrive Themes Suite review.

Method 2: Create a Sticky Floating Footer Bar With a Free Plugin

If you are looking for a free way to create a sticky floating footer bar, then this method is for you. However, keep in mind that you will have limited customization options compared to OptinMonster.

First, you need to install and activate the Firebox Popup Builder plugin. For detailed instructions, see our tutorial on how to install a WordPress plugin.

Upon activation, visit the Firebox » Campaigns page from the WordPress dashboard and click the ‘+ New Campaign’ button.

Click + New Campaign button

This will open the Firebox campaign library, where you can search for sticky floating bar premade templates.

Next, simply click the ‘Insert’ link under the floating footer bar that you like. Keep in mind that if you select a header bar, then you won’t be able to change its position. You must ensure the template you select is for a footer bar.

Click the Insert link under a template

The block editor will now open up on your screen, where you can start by adding a name for your floating bar.

After that, you can edit the text in the footer by clicking on it and add new blocks by clicking the ‘+’ button. This will open the block menu, where you can add images, headings, paragraphs, videos, quotes, or list blocks.

For instance, if you want to add social media handles, then you can choose the Social Icons block. After that, you can add social media accounts and links using the block panel.

For more details, you can see our tutorial on how to add social media icons in WordPress menus.

Add blocks in the floating footer bar from the block menu

You can also change the text in the button block and add a link to the page where you want to direct users by clicking on the link icon in the block toolbar.

After that, type in the URL of your choice and press ‘Enter’.

Add a link for the button

Next, you can scroll down to the ‘Firebox Settings’ section.

Here, you can change the background color, text color, alignment, size, padding, and margin for the floating footer bar.

Configure floating footer bar design

After that, switch to the ‘Behaviour’ tab from the left column and select ‘Page Load’ as the floating bar trigger point.

Then, use the ‘Delay’ slider to choose a delay timing for the floating bar. For example, if you drag the slider to 15 seconds, then the floating footer bar will be displayed once the user has spent 15 seconds on your site.

If you want the sticky floating footer bar to be displayed immediately, then you can keep the slider at 0.

Choose a trigger point for footer bar

Next, you can leave other settings as they are or configure them according to your liking.

Once you are done, don’t forget to click the ‘Publish’ button at the top.

Publish floating footer bar

Now visit your WordPress site to view the sticky floating footer bar in action.

This is what it looked like on our demo site.

Sticky floating footer bar preview

Bonus: Create a Sticky Floating Navigation Menu in WordPress

Apart from adding a sticky footer bar, you might also like to create a sticky floating navigation menu on your WordPress site.

A navigation menu contains links to the most important pages on your WordPress blog and acts as an organizational structure for your website.

If you make this menu sticky, then it will remain visible on your page at all times, even as the user scrolls down on your screen. This can increase engagement and make your website easier to navigate.

Sticky floating navigation menu preview

To create a sticky floating navigation menu, simply install and activate the Sticky Menu & Sticky Header plugin. For details, see our tutorial on how to install a WordPress plugin.

Upon activation, visit the Settings » Sticky Menu page from the WordPress dashboard and type #main-navigation next to the ‘Sticky Element (required)’ option.

Type navigation menu as the sticky element

After that, click the ‘Save Changes’ button to store your settings. You have now successfully created a sticky floating navigation menu.

For detailed instructions, please see our tutorial on how to create a sticky floating navigation menu in WordPress.

We hope this article helped you learn how to easily create a floating sticky footer bar in WordPress. You may also want to see our beginner’s guide on how to add header and footer code in WordPress and our checklist of things to add to the footer on your WordPress site.

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

The post How to Create a “Sticky” Floating Footer Bar in WordPress first appeared on WPBeginner.

Determine if email address is used by scammer

Featured Imgs 11

I have been receiving emails from a gmail email address, I tried doing reverse searches on it but not coming up anything. I have a feeling it may be the scammers posing as a police department. Is there anyway I can determine the owner of the email address or its validity?

Off-Page SEO Techniques: Boost Your Website’s Visibility

Featured Imgs 23

In the ever-evolving landscape of search engine optimization (SEO), off-page techniques are crucial for enhancing your website’s visibility and authority. While on-page optimization focuses on refining your website’s content and structure, off-page SEO encompasses strategies beyond your site that influence its ranking on search engine results pages (SERPs). In this blog post, we’ll delve into …

The post Off-Page SEO Techniques: Boost Your Website’s Visibility first appeared on Lucid Softech.