Wrap menu in tags Resolved Requested: 2 months and 3 days ago Hi 🙂 Is it possible to wrap the sidebar in <nav> tags for better SEO? I use the widget in the sidebar. Many thanks! Remco
OnPoint Plugins 2 months and 3 days ago Hi Remco, Adding the following filters to your active theme’s functions.php file will wrap each widget in a <nav></nav> HTML tag. add_action( 'advanced-sidebar-menu/widget/before-render', function() { echo '<nav>'; }, 0 ); add_action( 'advanced-sidebar-menu/widget/after-render', function() { echo '</nav>'; }, PHP_INT_MAX ); Have a great day!
Hi Remco,
Adding the following filters to your active theme’s functions.php file will wrap each widget in a
<nav></nav>
HTML tag.Have a great day!
You are amazing, many thanks!