wordpress add class on navigation menu

Adding a Class to a WordPress Navigation Menu

To add a class to a navigation menu in WordPress, you can follow these steps:

  1. Find the Menu in the WordPress Admin Dashboard:
  2. Log in to your WordPress admin dashboard.
  3. Go to "Appearance" and then click on "Menus."

  4. Select the Menu to Edit:

  5. Choose the menu you want to edit from the drop-down menu at the top of the page.

  6. Enable CSS Classes:

  7. If you don't see the "CSS Classes" field, you can enable it by clicking on "Screen Options" at the top of the page and then checking the "CSS Classes" option.

  8. Add a Class to the Menu Item:

  9. Expand the menu item that you want to add a class to by clicking on the downward arrow icon.
  10. In the expanded menu item, you should now see a "CSS Classes (optional)" field where you can enter the class name you want to add.

  11. Save the Menu:

  12. After adding the class to the menu item, click the "Save Menu" button to save your changes.

By following these steps, you can add a class to a navigation menu in WordPress.