Custom HTML before event content – controlling where it appears

Home Forums Calendar Products Events Calendar PRO Custom HTML before event content – controlling where it appears

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1245710
    Paul
    Participant

    Hi

    In settings I have defined custom HTML to appear as per image.
    It appears on EVERY page by default.

    Can I control where it appears – I would rather it didn’t appear on some pages.

    For example – I have the Community Events add on.
    When adding a new event on /events/community/add it doesn’t make sense to include the text there.

    Thanks

    #1246532
    Cliff
    Keymaster

    Hi, Paul.

    You might benefit from putting your custom content in one of these 2 extensions:

    Please let me know how this goes for you.

    #1246758
    Paul
    Participant

    Hi Cliff

    Thanks for your reply. I have already manged to get extra text specifically on the “Add new community Event” page, but modifying that template. In the attached image, it is the text directly above the EVENT TITLE.
    (just spotted my typo on “Sumbit an Event”, lol, had best fix that!)

    Anyway… what i need to do is in fact REMOVE the text at the top – as cirecled in red.

    This text is defined in
    Setting -> Display -> Advanced Template Settings -> Add HTML before event content

    This appears on every page – calendar, event, whatever… which is in the main fine, but I want to exclude it from this one single page, the one produced by “community/edit-event.php”. Happy to modify whichever template it is which controls the placement of this text – i just need to know which template, and what conditional code to test for being on the Community Add page…

    Thanks

    #1247369
    Cliff
    Keymaster

    Paul, I think this is the snippet you’re looking for:

    https://gist.github.com/barryhughes/be4b056257ceb214d169

    Please let me know how this goes for you.

    #1247531
    Paul
    Participant

    Hi Cliff
    thanks code look EXACTLY like what i would need… the only problem left – is I have no idea where to put the code!
    I assume its not simply inserted into the template I tried and it didn’t work)
    Can you advise the specific location for the php file, or the contents of it, ie whatever is needed to apply such filters?
    thanks

    #1247946
    Cliff
    Keymaster

    Welcome to WordPress customizing!

    Best practice for adding custom code (like to implement a PHP snippet to modify The Events Calendar) is to create a functionality plugin, unless it’s something specific to your theme, in which case best practice is to make sure you’re using a child theme, then add the customization to your child theme’s functions.php file.

    I hope this information helps!

    #1258770
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Custom HTML before event content – controlling where it appears’ is closed to new replies.