• Resolved mohinvest

    (@mohinvest)


    Hi,

    How do I create a button for a menu item like a call to action?

    • This topic was modified 2 years, 1 month ago by mohinvest.
    • This topic was modified 2 years, 1 month ago by mohinvest.
    • This topic was modified 2 years, 1 month ago by mohinvest.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Kathryn Presner

    (@zoonini)

    Hi there @mohinvest – to highlight a navigation menu item and make it look like a button/CTA, there are two steps:

    • Add a custom class to the navigation link block, in the Advanced > Additional CSS Class area. For example, it could be called myclass or whatever you prefer, as in this screenshot. (No spaces or special characters.)
    • Add some custom CSS to apply to your new class. For example:
    /* Menu CTA */
    .wp-block-navigation-item.myclass {
        background-color: #bb00bb;
        color: #ffff33;
        padding: 10px 15px;
    }

    Of course, you can modify the colours and padding as you like.

    While the Customizer is not exposed by default when using Site Editing, you can still access it manually by adding /wp-admin/customize.php after your URL. You can then add custom CSS in the Additional CSS area.

    Let me know how it goes.

    Thread Starter mohinvest

    (@mohinvest)

    THANK YOU!

    Moderator Kathryn Presner

    (@zoonini)

    You’re very welcome!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Create a button for menu item’ is closed to new replies.