WP Custom Menu Widget not showing headers? (1 post)

  1. acknowledged74
    Posted 3 years ago #


    I've just installed a new version of WP and when I've gone to add a custom menu for some reason the header is only showing as completely normal text rather than the <h> tag that it should?

    I have checkout in the code and it just not there. I've looking in default-widgets.php at the relevant bit, I think atleast which I've included below,

    class WP_Nav_Menu_Widget extends WP_Widget {

    function __construct() {
    $widget_ops = array( 'description' => __('Use this widget to add one of your custom menus as a widget.') );
    parent::__construct( 'nav_menu', __('Custom Menu'), $widget_ops );

    function widget($args, $instance) {
    // Get menu
    $nav_menu = ! empty( $instance['nav_menu'] ) ? wp_get_nav_menu_object( $instance['nav_menu'] ) : false;

    if ( !$nav_menu )

    $instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );

    echo $args['before_widget'];

    if ( !empty($instance['title']) )
    echo $args['before_title'] . $instance['title'] . $args['after_title'];

    I would really appreciate some guidance here.


Topic Closed

This topic has been closed to new replies.

About this Topic

  • RSS feed for this topic
  • Started 3 years ago by acknowledged74
  • This topic is not resolved
  • WordPress version: 3.5.1