Output custom HTML if menu item has specific class

I have a Navigation setup that looks like this..

<?php wp_nav_menu( array(
‘theme_location’ => ‘header_navigation’,
‘menu_id’ => ‘navigation’,
‘menu_class’ => ‘main-navigation-mobile-vertical-center no-bullet’,
‘container’ => ”,
) );
?>

I have some custom HTML that I would like to output if a menu item has a class of ‘customitem’

What is the best way to achieve this, should I be using a walker?

Read more here:: Output custom HTML if menu item has specific class

Leave a Reply

Your email address will not be published. Required fields are marked *