WordPress.org

Support

Support » How-To and Troubleshooting » Help!! Option for sidebar2 missing in editor

Help!! Option for sidebar2 missing in editor

  • TheOrganicSister
    Member

    @theorganicsister

    I just uploaded a new theme (dandelion style). When I go to edit my widgets (appearance>widgets) it is only giving me the option of sidebar1. No sidebar2 in the pulldown at all.

    If you look at my site (http://theorganicsister.com) you can see the outer sidebar which has everything the widget editor says Sidebar1 has. The inner sidebar shows a repeat of some of the wigets in the outer sidebar (categories but not alphabetized, archives) as well as “menu”. I can’t delete these or edit them.

    Have no idea what to do!!!

    Tara
    http://theorganicsister.com

Viewing 10 replies - 1 through 10 (of 10 total)
  • buddha trance
    Member

    @buddha-trance

    I could tell you what you can try to fix it, but I’d rather tell you to stay away from this theme, as it contains obfuscated code in functions.php and footer.php, and I stopped checking for more.
    I just downloaded this theme to see the sidebar code…

    To know what obfuscated code is, read this thread
    http://wordpress.org/support/topic/235659?replies=5

    Advice – stay away from this theme!

    TheOrganicSister
    Member

    @theorganicsister

    Um. Wow. Okay.

    Can I fix it so I can use it while I look for another suitable theme? Or it is so unsafe that I should delete it right away?

    buddha trance
    Member

    @buddha-trance

    It’s never good to have hidden code. I would personally delete it.

    TheOrganicSister
    Member

    @theorganicsister

    Okay I deleted it and found an almost identical one from WordPress.org (called page-style). This one is doing the same thing. I would imagine because it’s from WordPress that there shouldn’t be hidden code; am I right? But are the widgets fixable?

    buddha trance
    Member

    @buddha-trance

    Yes, this one is fine, identical to the other one, and has no hidden code.

    I checked your site, and the sidebars seem fine, with no duplicated content. Are you still having the same problem?

    If so, try this:

    In sidebar.php, add the registration code for sidebar-left, and call it “sidebar one”

    <div id="sidebar-left">
    	<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Sidebar One") ) : ?>

    Then, add the name “sidebar two”, to the right sidebar

    <div id="sidebar-right">
    			<div id="subfeed" >
    				<a href="<?php bloginfo('rss2_url'); ?>"><img height="50" border="0" width="215" alt="Sub via feed" title="Sub via feed" src="<?php bloginfo('template_url'); ?>/img/feed.gif"/></a>
    			</div>
    				<?php 	/* Widgetized sidebar, if you have the plugin installed. */
    					if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar("Sidebar Two") ) : ?>

    In functions.php, call both sidebars in separate arrays

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar( array(
        'name' => 'Sidebar One',
            'before_widget' => '<div class="s-menu sidebar-box">',
            'after_widget' => '<div class="s-menub"></div></div>',
            'before_title' => '<h2>',
            'after_title' => '</h2>',
        ));
    
         register_sidebar( array(
        'name' => 'Sidebar Two',
            'before_widget' => '<div class="s-right sidebar-box">',
            'after_widget' => '<div class="s-rightb"></div></div>',
            'before_title' => '<h2>',
            'after_title' => '</h2>',
        ));
    
    }
    ?>

    See if this works for you.

    TheOrganicSister
    Member

    @theorganicsister

    Questions: Where in sidebar.php am I adding the first and second and am I deleting anything else, like al the code for menu, categories etc?

    And in functions do I delete what is there, replacing it completely or simply add this to what is there?

    Thank you for your help. I’m loking forward to making this work. 🙂

    TheOrganicSister
    Member

    @theorganicsister

    Okay I tried only adding the first bits without taking anything out. And I completely replaced the functions with what is there. Still not working. 🙁

    TheOrganicSister
    Member

    @theorganicsister

    I’ve tried rewriting and overwriting 4 times now. But when I go to Appearance>Editor, it shows NO changes! WTH???

    buddha trance
    Member

    @buddha-trance

    In functions.php, you rewrite over and replace

    In sidebar.php you add the code as follows:

    Fist bit you just write over <div id="sidebar-left"> so you add the php code to register the sidebar.

    Second bit you just have to add the sidebar name in the php code that is there, or write the bit over starting from <div id="sidebar-right">. This second bit only adds “Sidebar Two” to the php code registering the sidebar.

    I just realized the same issues when I started using this theme, thanks for asking & answering. 🙂

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Help!! Option for sidebar2 missing in editor’ is closed to new replies.