Inserting a “header block” in Month View of the Calendar using Avada styling?

Home Forums Calendar Products Events Calendar PRO Inserting a “header block” in Month View of the Calendar using Avada styling?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1121492
    James
    Participant

    Hi,

    Refering back to an old thread I posted in October 2015 Old Post

    I’m wondering if there is a way to put a header “block” on to the calendar month view only, not have it show in single events.

    I know that if I modify the “default-template.php” I can do a workaround but I am using the avada theme and in the event calendar settings > Display > Default stylesheet used for events templates > I’m using “Full Styles” and in Events template settings I’m using “Default Page Template”, which doesn’t use the default-template.php

    Any assistance would be appreciated.

    Cheers

    James

    #1121823
    Nico
    Member

    Hi James,

    Thanks for touching base! I’ll help you here…

    I’m wondering if there is a way to put a header “block” on to the calendar month view only, not have it show in single events.

    I’m not sure about this, by header block you mean HTML content? If this is the case, then the snippet below should do the trick:


    /* Add some custom content before month view */
    function maybe_add_content ( ) {

    if ( ! tribe_is_month() ) return;

    echo 'Hello month view!';
    }

    add_action('tribe_events_before_template', 'maybe_add_content');

    You’ll need to paste the code in your child theme’s functions.php file.

    Please let me know if this answers your question,
    Best,
    Nico

    #1121943
    James
    Participant

    Hi Nico,

    Thanks for the reply and I must apologies for my lack of technical naming. 😉

    But you were right in your guess of what I meant.

    Your a legion LOL, your piece of code worked perfectly.

    You can see how I used this code here

    Thanks again for your assistance. Go ahead and close this ticket.

    Cheers

    James

    #1122206
    Nico
    Member

    Thanks for the heads-up James! Really stocked to hear the snippet worked like a charm 🙂

    I was not sure if this was what you were looking for but glad it was!

    I’ll go ahead and close out this thread, but if you need help with anything else please don’t hesitate to create a new one and we will be happy to assist you.

    Have a great weekend,
    Nico

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Inserting a “header block” in Month View of the Calendar using Avada styling?’ is closed to new replies.