Home › Forums › Calendar Products › Events Calendar PRO › Custom HTML before event content – controlling where it appears
- This topic has 7 replies, 4 voices, and was last updated 9 years, 1 month ago by
Paul.
-
AuthorPosts
-
February 25, 2017 at 1:12 am #1245710
Paul
ParticipantHi
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
February 27, 2017 at 3:01 pm #1246532Cliff
MemberHi, Paul.
You might benefit from putting your custom content in one of these 2 extensions:
- https://theeventscalendar.com/content/uploads/2016/12/tribe-ext-calendar-widget-areas.zip (how-to article is yet to be published but you can click here for existing screenshots)
- https://theeventscalendar.com/extensions/display-custom-html-specific-calendar-views/
Please let me know how this goes for you.
February 28, 2017 at 1:59 am #1246758Paul
ParticipantHi 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 contentThis 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
February 28, 2017 at 7:55 pm #1247369Cliff
MemberPaul, 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.
March 1, 2017 at 3:00 am #1247531Paul
ParticipantHi 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?
thanksMarch 1, 2017 at 12:59 pm #1247946Cliff
MemberWelcome 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!
March 23, 2017 at 9:35 am #1258770Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Custom HTML before event content – controlling where it appears’ is closed to new replies.
