2

If you have like 20 text box widgets and you are using widget logic or something to selectively display them on various pages, it gets confusing what content is in each box IF you are not using the title box. they will all then just say "text."

Would be nice if the text widgets had a descriptive field where you can enter a title that the system will not display, but users can identify what code or text is in a particular text widget. I hope this makes sense.

is there a way to do this that I can't see?

I know I can enter a title and then remove all titles with CSS, but I want to display some titles.

I feel there is a way

  • 2
    This is an annoying problem. Plugin recommendations are off-topic here on WPSE, but while researching the issue I found something that looks perfect: wordpress.org/plugins/widget-labels – Dave Romsey Jun 8 '17 at 20:51
  • Sorry I did not know about the no plugin rule. I just joined yesterday. But I did go with your plugin suggestion. Can you post as answer please, so that I may select your answer, although @birgire would have been the next best if not for yours :-) Thank you. – Norman Bird Jun 9 '17 at 13:24
2

It looks like the suggestion by @DaveRomsey will solve the problem.

Another simple idea is from a plugin by Stephen Cronin, (I'm not related to that plugin in any way.) that uses the widget_title filter:

add_filter( 'widget_title', function( $title ) 
{
    return '!' === mb_substr ( $title, 0, 1 ) ? '' : $title;
} );

where I've adjusted the code a little bit.

It simply removes the widget's title if it starts with !.

This is handy for e.g. Text Widgets containing ads where we don't want the widget's title to display on the front-end. This approach makes it easier to manage the widgets as we can still see their titles in the backend.

Hope it helps!

0

Solution was provided in comment by user. No way to select user. I asked them to post an answer, they are not, so

This is an annoying problem. Plugin recommendations are off-topic here on WPSE, but while researching the issue I found something that looks perfect: wordpress.org/plugins/widget-labels – Dave Romsey

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.