How to change heading text in event-bar

Home Forums Calendar Products Events Calendar PRO How to change heading text in event-bar

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1006749
    David
    Participant

    I would love to change and customize the text inside the label class “label-tribe-bar-date” and “label-tribe-bar-search”. I have searched all the customization and nearly have of the functions and views files, but I was not able to find the appropriate section.
    Could you help me out?
    Thanks in advance,

    David

    #1007047
    Barry
    Member

    Hi David,

    If it’s the placeholder text you wish to change then there are a few ways to do that, one of which would be adding a short snippet like this one to your theme’s functions.php file or some other suitable place:

    function event_bar_modify_placeholder_text( array $filters ) {
    	foreach ( $filters as &$single_filter ) {
    		$single_filter['html'] = str_replace(
    			'placeholder="Date"',
    			'placeholder="Something else"',
    			$single_filter['html'] );
    	}
    
    	return $filters;
    }
    
    add_filter( 'tribe-events-bar-filters', 'event_bar_modify_placeholder_text', 100 );

    You could of course extend this to change other things, besides the “Date” placeholder text.

    If you prefer a solution that doesn’t require custom code then you might consider using a plugin such as Say What, however that would typically have a side effect of changing the word everywhere rather than this specific location.

    I hope that helps!

    #1009189
    David
    Participant

    Hi Barry,
    Thank you for that tip! That did the trick and replaced the placeholder text. What should I do to change the text of the label content:
    <label class=”label-tribe-bar-date” for=”tribe-bar-date”>T E X T T O C H A N G E</label>

    Cheers,
    David

    #1009328
    Barry
    Member

    Hi David,

    You could use a similar approach – but instead of looking at and modifying $single_filter[‘html’] you would be interested instead in $single_filter[‘caption’] 🙂

    Does that help?

    #1014079
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘How to change heading text in event-bar’ is closed to new replies.