• Resolved winterstreet

    (@winterstreet)


    The menu is working great but I’ve been asked to change (or remove) the H4 that are automatically generated in the menu. I don’t see a setting related to that. Any ideas or is that available in the pro version?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter winterstreet

    (@winterstreet)

    Just to be clear, I know I can use CSS to hide them but an SEO person doesn’t want headings there even if they’re hidden. These are the h4 with the class “mega-block-title”

    Plugin Author megamenu

    (@megamenu)

    Hi winterstreet,

    Please try adding this to your functions.php file:

    function megamenu_use_h3_before( $title , $widget ) {
    	return '<h3 class="mega-block-title">';
    }
    add_filter( "megamenu_before_widget_title", "megamenu_use_h3_before", 10, 2);
    
    function megamenu_use_h3_after( $title , $widget ) {
    	return '</h3>';
    }
    add_filter( "megamenu_after_widget_title", "megamenu_use_h3_after", 10, 2);

    The Css that MMM generates to style the widget titles will still refer to H4, so you will need to write some custom CSS to style your h3 titles.

    Regards,
    Tom

    Thread Starter winterstreet

    (@winterstreet)

    Perfect, thank you for helping me with this.

    Thread Starter winterstreet

    (@winterstreet)

    Commenting just to mark this resolved.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Change H4 to something else?’ is closed to new replies.