WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. hotwebideas
    Member
    Posted 1 year 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
    Member
    Posted 1 year ago #

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

    Appearance >> Widgets

    It looks like this:

    http://tinyurl.com/8j8nhvr

    You can now delete the individual widgets.

    Good Luck.

  3. hotwebideas
    Member
    Posted 1 year 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