• Resolved Hlsg

    (@hlsg)


    Although i have no widget areas defined in my theme, and am implicitely not using the Meta widget, the result of this piece of code appears at the end of my HTML:

    	public function hide_meta_widget_link(){
    		if ( is_active_widget( false, false, 'meta', true ) && wp_script_is( 'jquery', 'enqueued' ) ) {
    			echo '<script> jQuery(function($){ $(".widget_meta a[href=\'' . esc_url( get_bloginfo( 'comments_rss2_url' ) ) . '\']").parent().remove(); }); </script>';
    		}
    	}

    Why is this and how to resolve?

    • This topic was modified 8 years, 5 months ago by Hlsg.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Samir Shah

    (@solarissmoke)

    Hi @hlsg,

    This JS should only be appearing if you have the “Meta” widget enabled on your site (links to Login/Logout/Admin/Feeds). If it’s appearing even without that then there’s a bug somewhere. Would you mind sharing a link to your site so that I can have a look at what is being rendered?

    Thread Starter Hlsg

    (@hlsg)

    Actually, i just figured it out. The barebones theme i started with came with a sidebar defininition, which i removed and moved on. Now, i reactivated that definition and, the meta widget along with the stadard WP widgets search and whatnot were added to it. Removed meta and it’s all good.
    I guess is_active_widget checks only if a widget is added to a sidebar and returns true even if said sidebar is no longer defined or active.

    I’m sorry for taking up your time for no good reason and thank you for this always useful plugin!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Redundant js at the end of my HTML’ is closed to new replies.