• Resolved mixedmediagirl

    (@mixedmediagirl)


    Hi
    I’ve taken over a website and I’m still learning WordPress.
    There is a widget in the footer that has a field titled “Buyer” and the title shows up even if the input field is empty. Is there a way to disable it or do I need to get access to the widget code?
    (hopefully this makes sense…)
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Use CSS to target it and turn it off. If that doesn’t mean anything to you, please provide a link to a page on your site where we can see this. Thanks.

    It depends on your widget code.
    In your widget code, the function widget( $args, $instance ) of WP_Widget will be reloaded. For example:

    
    class your_widget_class extends WP_Widget {
        public function widget( $args, $instance ) {                                                                                                                                 
            extract( $args );
            
            $instance['title'] = apply_filters( 'widget_title', empty( $instance['title'] ) ? '' : $instance['title'], $instance, $this->id_base );
            
            echo $before_widget;
                
           <strong> echo empty( $instance['title'] ) ? '' : $before_title . $instance['title'] . $after_title;<em>//This line will judge whether the empty title should be displayed. if your widget doesn't do something like this, the title will always be displayed</em></strong>
                
            if ( ! $output = apply_filters( 'baidu_translator_widget_output', '', $instance, $args ) ) {
                baidu_translator( $instance );
            }
            
            echo $after_widget;
    }
    
    • This reply was modified 8 years, 1 month ago by Jan Dembowski. Reason: Code fix
    Thread Starter mixedmediagirl

    (@mixedmediagirl)

    I don’t have access to the widget code (I don’t think…)
    The site is at https://albertacattlebreeders.com/
    The widget is in the footer “Pen of 5”
    Trying to remove the word “Buyer”

    Thanks!

    Moderator bcworkz

    (@bcworkz)

    .winner_box:nth-child(3) small {
      display: none;
    }
    Thread Starter mixedmediagirl

    (@mixedmediagirl)

    Thanks @bcworkz! All fixed

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Remove a field title from a widget’ is closed to new replies.