Mega-menus are an excellent way to organize and display large amounts of content in a structured manner. In the Extra theme, making the mega-menu titles clickable can enhance navigation and improve user experience by allowing visitors to access main category pages directly.
This article will guide you through the steps to make mega-menu titles clickable in the Extra theme, providing your users with a more intuitive and seamless browsing experience.
Log in to your WordPress website
Go to WordPress Dashboard β Extra β Theme Option β Integration tab β Header
Copy and Paste the following JS code:
<script>
(function ($) {
$(document).ready(function () {
$('#main-header .featured-post').each(function () {
var url = $(this).find('a:first').attr('href');
$(this).find('h2').wrap('<a href="' + url + '"></a>');
});
});
})(jQuery);
</script>
After adding the above code, the titles inside the mega-menu will be clickable.