• Having a problem with wordpress that’s just leaving me stuck. Initially thought it was the custom template I made causing the issue but now I’m not so sure. When I try to add custom menu items or some widgets to the sidebar it just loads….and loads….and loads forever without ever actually adding the item on. tried reinstalling wodrepss as well with no luck. Any suggestions?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Are you trying to create a new custom widget area?

    Thread Starter Tyger0

    (@tyger0)

    The site already has a custom widget area and custom menu. When I add pages to the menu or when I try to add something like an RSS to the widget, the loading icon (that little spinning circle thing, for lack of better words) just loads and loads forever and the item is never added.

    What kind of function are you using to get the ‘custom widget area’ or dynamic sidebar? Are you using something like this:

    if ( function_exists('register_sidebar') )
          register_sidebar(array(
              'before_widget' => '',
              'after_widget' => '',
              'before_title' => '',
              'after_title' => '<div class="clear"></div>',
              'name' => 'sidebar'
          ));

    To register it, than this to call it in your sidebar.php file?

    <?php if ( !function_exists('dynamic_sidebar')
              || !dynamic_sidebar('sidebar') ) : ?>
              <!-- default content -->
       <?php endif; ?>
    Thread Starter Tyger0

    (@tyger0)

    This is what I’m using

    // Register widgetized areas
    function theme_widgets_init() {
        // Area 1
        register_sidebar( array (
        'name' => 'Primary Widget Area',
        'id' => 'primary_widget_area',
        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
        'after_widget' => "</li>",
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
      ) );
    
        // Area 2
        register_sidebar( array (
        'name' => 'Secondary Widget Area',
        'id' => 'secondary_widget_area',
        'before_widget' => '<li id="%1$s" class="widget-container %2$s">',
        'after_widget' => "</li>",
        'before_title' => '<h3 class="widget-title">',
        'after_title' => '</h3>',
      ) );
    
      register_sidebar( array(
    		'name' => __( 'Footer Area One' ),
    		'id' => 'sidebar-3',
    		'description' => __( 'An optional widget area for your site footer' ),
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget' => "</aside>",
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    	register_sidebar( array(
    		'name' => __( 'Footer Area Two' ),
    		'id' => 'sidebar-4',
    		'description' => __( 'An optional widget area for your site footer' ),
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget' => "</aside>",
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    	register_sidebar( array(
    		'name' => __( 'Footer Area Three' ),
    		'id' => 'sidebar-5',
    		'description' => __( 'An optional widget area for your site footer' ),
    		'before_widget' => '<aside id="%1$s" class="widget %2$s">',
    		'after_widget' => "</aside>",
    		'before_title' => '<h3 class="widget-title">',
    		'after_title' => '</h3>',
    	) );
    
    } // end theme_widgets_init
    
    add_action( 'init', 'theme_widgets_init' );
    
    // precode the search, pages, categories, archives, links and meta widgets into the sidebars
    
    $preset_widgets = array (
        'primary_widget_area'  => array( 'search', 'pages', 'categories', 'archives' ),
        'secondary_widget_area'  => array( 'links', 'meta' )
    );
    if ( isset( $_GET['activated'] ) ) {
        update_option( 'sidebars_widgets', $preset_widgets );
    }

    Your code looks pretty solid, perhaps if you just tried to register one sidebar and see if that works. If that works, just keep adding code until you see where you made a mistake. May be a bit time consuming, but I think you will find where the problem is lying this way. Sorry I couldn’t be more help than this.

    Thread Starter Tyger0

    (@tyger0)

    thanks. Moreso my menu is the bigger concern. Its the one thing really holding me up. Here it is.

    * This theme uses wp_nav_menu() in one location.
    */
    register_nav_menus( array(
    ‘primary’ => __( ‘Primary Menu’, ‘praisable’ ),
    ) );
    `

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Menus and Widgets errors’ is closed to new replies.