How to hide widgets by a specific title (3 posts)

  1. hotwebideas
    Posted 3 years ago #

    I cannot find this on Google anywhere, but I have a situation where I only want a widget with title "Contact Me" to display in my sidebar. I want to hide widgets with any other title.

    I tried <?php the_widget('WP_Widget_Text', "title=Contact Me"); ?> , but it did not display.

    Any help would be appreciated.

  2. playing2012
    Posted 3 years ago #

    You can remove the widgets from your sidebar by going to your dashboard and then:

    Appearance >> Widgets

    It looks like this:


    You can now delete the individual widgets.

    Good Luck.

  3. hotwebideas
    Posted 3 years ago #

    thanks, playing2012m, but I this is for a multisite and I need to do this programmatically to prevent the other administrators fro showing the widgets even if they add them from the widget menu.

Topic Closed

This topic has been closed to new replies.

About this Topic