WordPress.org

Ready to get started?Download WordPress

Forums

Extra widget appearing in sidebar (12 posts)

  1. mwproductions
    Member
    Posted 2 years ago #

    I've been tearing my hair out over this for a couple of days, so hopefully someone can help point me in the right direction.

    Background
    I recently inherited this site from another developer, so I'm not super-familiar with its idiosyncrasies. It appears to be a custom theme. It's probably built off of Twenty Eleven or something, but I can't say for sure. It has about 50 plugins installed.

    The Problem
    One section of the site (which is behind a login, so I can't link you to it, sorry. Check out the image below) displays a "phantom" widget. That is, on each of the pages within that section, the secondary widget area is set to be empty. Despite that, the phantom widget appears.

    Here's the widget in question: http://i.imgur.com/Diuhn.png

    If I select a widget to appear in the secondary widget area, the phantom widget is replaced with whatever I selected. As soon as I make the secondary widget empty again, the phantom widget returns.

    Previously Attempted Solutions
    As I mentioned, I have checked to make sure the pages don't have any secondary widget selected.

    One of the many plugins is called "Custom sidebars," and it seems to completely manage the sidebars. I tried turning it off and all of the sidebars on every page disappeared completely. It could be the culprit, but at this point I'm not sure how to test further.

    I checked out the menu and sidebar setups for the section. Neither has the phantom widget, so I'm pretty sure it's not them.

    I have checked several template files for the pages within the section. They only make a call to get_sidebar();.

    The file sidebar.php does not appear to be out of the ordinary. I added a class to the div in that file where id="secondary" and saw that change reflected in the phantom widget's containing div. In side the div is the WordPress function dynamic_sidebar( 'secondary-widget-area' );.

    I've poked around in various core files without any luck, but I may have missed something. If anyone can point me in a direction, I would be much obliged.

  2. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Can you post your site URL?

  3. mwproductions
    Member
    Posted 2 years ago #

    @Krishna - This is the page in question, but as I said, you won't be able to view it because it's behind a login.

  4. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    So, what is the real problem? You want to remove that phantom widget?

  5. mwproductions
    Member
    Posted 2 years ago #

    Yeah, I can't figure out why it's appearing. It only shows up in that one section, but it shows up on every page in that section.

  6. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Does that section requires a separate login?
    Can you login?
    Can you edit the template files in that section?
    Can you login to your hosting account?

    It seems that that widget is coming installed with the theme. If you anwser yes to the above questions, try to deactivate all the plugins and revert to Twenty Eleven theme and see if the widget appears.

  7. mwproductions
    Member
    Posted 2 years ago #

    Ugh. Did you even read my initial post?

    One of the many plugins is called "Custom sidebars," and it seems to completely manage the sidebars. I tried turning it off and all of the sidebars on every page disappeared completely. It could be the culprit, but at this point I'm not sure how to test further.

  8. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    I read it, but as you describe above, the only way you can go about the job is to have complete access to the site and to revert to Twenty Eleven theme, and after solving the issues, to put back your favorite plugins and theme. If you cannot do so, you can only make guesses as to what is hampering your work and the desired functioning of your site.

  9. mwproductions
    Member
    Posted 2 years ago #

    Well, I reverted to the Twenty Eleven theme and pretty much everything is gone. The sidebars, the content, all nowhere to be found.

  10. Krishna
    Volunteer Moderator
    Posted 2 years ago #

    Did you revert to the old theme?

    If what state above is correct, the site is designed to keep the phantom widget and possibly other exploits running.

    If you want to get rid of it, you have to revert to the default theme and work your way through. Make a back up of the entire site including your database.

    Sorry, I cannot suggest any other ideas.

  11. alchymyth
    Forum Moderator
    Posted 2 years ago #

    If I select a widget to appear in the secondary widget area, the phantom widget is replaced with whatever I selected. As soon as I make the secondary widget empty again, the phantom widget returns.

    sounds like some hard-coded stuff in one of the sidebar files; however, from a screenshot, this is impossible to check;
    with a live site, one could at least check the associated html and css structure to get some clues.

    can you at least post the full code of sidebar.php?

    maybe, you will need to find someone to trust with the login details, possibly by posting a job at http://jobs.wordpress.net/ ...

  12. mwproductions
    Member
    Posted 2 years ago #

    Hi alchymyth,

    That was my suspicion too, but it doesn't seem to be the case. Here's the code from my sidebar.php file (I apologize if the formatting is goofy):

    <?php
    /**
     * The Sidebar containing the primary and secondary widget areas.
     *
     * @package WordPress
     * @subpackage openeye
     * @since OpenEye 1.0
     */
    ?>
    
    		<div id="primary" class="widget-area round shadow" role="complementary">
    			<ul>
    
    <?php
    	/* When we call the dynamic_sidebar() function, it'll spit out
    	 * the widgets for that widget area. If it instead returns false,
    	 * then the sidebar simply doesn't exist, so we'll hard-code in
    	 * some default sidebar stuff just in case.
    	 */
    	if ( is_active_sidebar( 'primary-widget-area' ) ) : ?>
    
    		<div id="primary-title" class="widget-area" role="complementary">
    			<ul>
    				<?php dynamic_sidebar( 'primary-widget-area' ); ?>
    			</ul>
    		</div>
    		<?php endif; // end primary widget area ?>
    			</ul>
    		</div>
    
    <?php
    	// A second sidebar for widgets, just because.
    	if ( is_active_sidebar( 'secondary-widget-area' ) ) : ?>
    
    		<div id="secondary" class="widget-area round shadow" role="complementary">
    			<ul>
    				<?php dynamic_sidebar( 'secondary-widget-area' ); ?>
    			</ul>
    		</div>
    
    <?php endif; ?>
    
    <?php
    	// A third sidebar for widgets, just because.
    	if ( is_active_sidebar( 'tertiary-widget-area' ) ) : ?>
    
    		<div id="tertiary" class="widget-area round shadow" role="complementary">
    			<ul>
    				<?php dynamic_sidebar( 'tertiary-widget-area' ); ?>
    			</ul>
    		</div>
    
    <?php endif; ?>
    
    <?php
    	// A fourth sidebar for widgets, just because.
    	if ( is_active_sidebar( 'quaternary-widget-area' ) ) : ?>
    
    		<div id="quaternary" class="widget-area" role="complementary">
    			<ul>
    				<?php dynamic_sidebar( 'quaternary-widget-area' ); ?>
    			</ul>
    		</div>
    
    <?php endif; ?>

    As I said before, if I edit the secondary widget in this file (for example, add an extra class to the div).

    If I remove the secondary widget entirely (even just the div), the phantom widget disappears, but then if I assign a secondary widget, it won't show up.

Topic Closed

This topic has been closed to new replies.

About this Topic