Adding a custom Notice …

Home Forums Calendar Products Events Calendar PRO Adding a custom Notice …

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1145550
    Sunny Bains
    Participant

    I need to add a notice to the month and week views when our custom filtering system is enabled to remind the user that thay are not seeing all events, currently I’m adding it by adding this to the content templates to simulate the message:

    <div class="tribe-events-notices">
    	<ul>
    		<li>Custom message goes here!</li>
    	</ul>
    </div>

    Ideally I’d like to add the notice to the list of notices that are provided when you call tribe_the_notices(), is there a function for this?

    #1145630
    George
    Participant

    Hey @Sunny,

    Thanks for reaching out.

    To pull off the sort of custom notice/messaging you describe, you will need to write some custom code. While we cannot help with writing custom code, I have written an example “starter” snippet for you here → https://git.io/vKh0Z

    ☝️ You can copy and paste that snippet into your theme’s functions.php file, for example. This way, you can register and display your own custom versions of tribe_the_notices()-style notices.

    Best of luck with your customizing and tinkering!

    Sincerely,
    George

    #1146010
    Sunny Bains
    Participant

    Thanks, I added a little extra code to retain any existing notices (e.g. no events found) but that works a treat.

    #1146077
    George
    Participant

    Excellent!

    Be sure to make back ups of any custom code you write—if you’ve modified plugin files directly, you risk losing those changes when you auto-update the plugin in the future (which overwrites existing files, for example).

    Best of luck with your project,
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Adding a custom Notice …’ is closed to new replies.