Home › Forums › Calendar Products › Events Calendar PRO › Right Patterns
- This topic has 5 replies, 2 voices, and was last updated 10 years, 3 months ago by
Nico.
-
AuthorPosts
-
January 28, 2016 at 1:21 pm #1064010
Maria Alejandra
ParticipantHi
i am customizing the calendar view, for that i was trying to use the pattern /themes/MYTHEME/trive-events/…
for one of more customizations i need to edit the file general.php from the-events-calendar\src\functions\template-tags
because of updates i dont want to work direct on that file in Plugins Folder, where can i do that? i have try many paths but doesnt work, reasonable Path can be /home/www-data/MYDOMAIN/wp-content/themes/MYTHEME/tribe-events/functions/template-tags but nothing.
An for us is very important to have a pattern in child theme for that files because we want to customize the event view as layout of our site.On Child theme can i edit only the files inside the-events-calendar\src\views? then SHOULD I MAKE A COPY of edited files FOR EACH plugin/addon update?
Filter Bar addon:
i miss in the documentation that to edit the css the file name should be “filter-view.css”, the location of this file is clear, should be in /tribe-events/filterbar/filter-view.css
On this case and in all other add/ons can i edit in child theme only the files in /ADDON/src/views ??Thank you very much
Maria Alejandra Paccioretti
January 29, 2016 at 7:19 am #1064479Nico
MemberHi Maria Alejandra,
Thanks for getting in touch! I’ll help you understand how to customize the views and CSS files of the plugin.
i am customizing the calendar view, for that i was trying to use the pattern /themes/MYTHEME/trive-events/
Hi guess this is a typo, but the path should be /themes/MYTHEME/tribe-events/ (not trive).
… i need to edit the file general.php from the-events-calendar\src\functions\template-tags because of updates i dont want to work direct on that file in Plugins Folder, where can i do that?
The template/file override just works for view files (files inside plugin_name/src/Tribe/views/) not for all file in the plugin. The file …/template-tags/general.php cannot be overwritten, it’s a core file of the plugin. Depending in what you need to tweak you might need to use hooks, template overrides or maybe create your own functions (stored in your child theme’s functions.php file) to interact with the calendar.
On Child theme can i edit only the files inside the-events-calendar\src\views? / On this case and in all other add/ons can i edit in child theme only the files in /ADDON/src/views ??
I think this has been answered above, but just to clarify: Yes only view files can be overwritten by your theme. And CSS files as explained in the guide (which I see you got right).
then SHOULD I MAKE A COPY of edited files FOR EACH plugin/addon update?
You’ll need to have a copy of the edeited files, yes. There’s not necessary that you update them with every plugin update. Just take a look into the release note of each plugin, if a template is changed it will be noted there.
<blockquote…to edit the css the file name should be “filter-view.css”, the location of this file is clear, should be in /tribe-events/filterbar/filter-view.css
Correct!Please let me know if you still have any doubts / follow-up questions on this,
Have a great weekend,
NicoJanuary 30, 2016 at 7:10 am #1065022Maria Alejandra
ParticipantHi Nico
Thanks for your help.
how can i use hooks? override the template or Where should i place the functions.php file?For the community events i am trying to work on ../tribe-events/Community/community-view.css but doesnt works, i tried as well on ../tribe-events/Community/tribe-events.css …but nothing and if i work above ../tribe-events/Community/tribe-events-community.css works but doesnt append the code to css, the original css file from Plugin is replaced.
Where can i edit the comunity css on child theme? how should i name the css file?Thank you very much
Maria Alejandra PacciorettiFebruary 1, 2016 at 11:56 am #1065916Nico
MemberHey Alejandra,
Thanks for following up!
how can i use hooks?
Hooks might come in handy for modifying information returned by our plugin. For example this article describes how to filter titles in the calendar. If you are not sure about how hooks, actions & hooks work in WordPress, I recommend you read this article: WordPress Essentials: The Definitive Guide To WordPress Hooks
override the template
That’s described in our themer’s guide, basically you provide a ‘modified’ copy of the template and locate it in your theme directory under ‘tribe-events/plugin/path_to_view/file.php’.
Where should i place the functions.php file?
Your template’s functions.php file always need to be placed at wp-content/themes/active_theme/functions.php. If you move the file WordPress won’t recognize it.
Where can i edit the comunity css on child theme? how should i name the css file?
As you state if the custom CSS file is in tribe-events/community/tribe-events-community.css (the correct path) it will prevent the load of the original file from the plugin folder. I think we are dropping the ball here, as this is not what’s stated in the themer’s guide. I’ll investigate on this to find if the text from the guide needs to be update because the process of how this works changed or if there’s an issue with the code incorrectly preventing the load of the original stylesheet. I’ll let you know when I get to know more on this.
For now you can leave the original code from ‘tribe-events-community.css’ in the copy of the file in your theme folder and just add your custom CSS below the original.
Sorry for the hassle with this issue, it’s a bad from our side 🙁
Please let me know if there’s anything else I can help you with,
Best,
NicoFebruary 15, 2016 at 4:48 am #1072967Maria Alejandra
ParticipantThis reply is private.
February 15, 2016 at 11:08 am #1073372Nico
MemberThis reply is private.
-
AuthorPosts
- The topic ‘Right Patterns’ is closed to new replies.
