How to Add Hover Effect With Custom Hover Class in WordPress Hover Card?

Key Takeaways

  • Nexter Blocks includes the Hover Card block, which allows users to create hover effects by assigning a parent container class name.
  • The Custom Hover option is available in Background Style and works similarly across Text and Image content types.
  • Users can change the button background color on hover by adding a class name, such as 'card', in the Enter Class field under the Hover tab.
Table of Contents

The Hover Card block from Nexter Blocks allows you to create a hover effect simply by assigning a parent container class name. This class enables you to apply custom styles and animations to the hover state, making your website more interactive and visually appealing for users.

To check the complete feature overview documentation of the Nexter Blocks Hover Card block, click here.

Requirement  – This block is a part of the Nexter Blocks, make sure it’s installed & activated to enjoy all its powers.

You can find the Custom Hover option in Background Style as well as in Text and Image content type separately, but the process works similarly for all.

Here we’ll use the Custom Hover option from Background Style.

For example, we have an anchor tag button inside a container class called “card”. 

Now we want to change the button background color when someone hovers over the “card” container.

So in the Hover Card block, we have an item with Div as the Open Tag and card as the class name, since we want to add an anchor tag inside the div, we’ll set None as the Close Tag. We’ll select None in the Content because this div is just a container. 

Then, in the second item, we’ll select a as the Open Tag and Default as the Close Tag. In the Content, we’ll select Text and add text for the button.

In the third item, we’ll set None as the Open Tag and Div as the Close Tag since we want to close the card container here.

Set None in the Content section as well.

Note: Make sure to style the elements according to your needs.

Now open the second item and turn on the Background toggle under the Background Style section. 

Go to the Hover tab and turn on the Custom Hover toggle. In the Enter Class field, add the parent container class name you want to target, for instance, we’ll add “card” here.

Note: Make sure to add the class name without .(dot) in front.

From the Background section, we’ll change the background color. 

Now, if you hover over the card container, the button background color will change.

About the Author

Photo of Aditya Sharma CMO of NexterWP
CMO at POSIMYTH Innovations · NexterWP · 7 years experience

He has spent years in the WordPress ecosystem building, breaking, and optimizing sites until they actually perform. He works at the intersection of speed, growth, and usability, helping creators ship websites that load fast and convert. An active WordPress community contributor sharing through tools, tutorials, and direct collaboration. Tested practice, not theory.

WordpressThemesElementorn8nAIClaudeAutomationServer

Share your Thoughts

Get Instant Answers to all your questions about Nexter Blocks,
Extensions & Theme trained on 1000+ Docs and Videos

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

What should I do if the hover effect doesn't work?

If the hover effect isn't working, check that you've correctly added the parent container class name in the Enter Class field without the dot. This class is essential for targeting the hover effect. If the class name is incorrect, the styles won't apply as intended. Additionally, ensure that the Nexter Blocks are installed and activated, as this feature relies on them.

What is the best way to style the hover effect for maximum impact?

For maximum impact, consider using contrasting colors for the hover effect that stand out against the original background. This ensures that users notice the change when they hover over the card. Additionally, test different animations to see which ones enhance user interaction without being distracting. The Nexter Blocks provide a range of options to experiment with.

Does the hover effect work on mobile devices?

The hover effect is primarily designed for desktop interactions, as mobile devices typically use touch instead of hover. However, you can create similar visual feedback using tap actions or other interactive elements. Always test your designs on mobile to ensure they provide a good user experience.

What happens if I forget to close the container tag properly?

If you forget to close the container tag properly, it can lead to layout issues or unexpected behavior in your hover effect. The structure of your HTML is crucial for the hover effect to work correctly. Always double-check that your Open and Close Tags are set appropriately to avoid these problems.

Last reviewed: April 14, 2026

Related Docs