Home › Forums › Calendar Products › Events Calendar PRO › Events Calendar 3.0 Not Working with Theme
- This topic has 55 replies, 17 voices, and was last updated 8 years, 10 months ago by Support Droid.
-
AuthorPosts
-
July 10, 2013 at 10:41 am #54309CinchParticipant
Also, it appears that the plugin you mentioned is not necessary… Adding tribe-events.css to the tribe-events directory within the theme replaces what would normally be loaded from the-events-calendar/resources/…
~ Bryan
July 10, 2013 at 10:45 am #54310Andy FragenModeratorYes, but while the tribe-events.css is loaded automatically, you will notice it is loaded ahead of the standard plugin CSS and not after it. Because of this the overrides won’t be seen. Simple to test, just deactivate the plugin.
July 10, 2013 at 10:49 am #54313Andy FragenModeratorActually, it seems to automatically load after the TEC CSS but before the TEC Pro CSS
July 10, 2013 at 11:01 am #54317CinchParticipantWhere it’s loaded isn’t currently affecting this project, but I can see why you’d want it to load later. And then automatically NOT load the pro styles.
Any thoughts on my previous dequeue question? Thanks, and my apologies if I’m bugging you too much.
July 10, 2013 at 11:29 am #54321Andy FragenModeratorDidn’t this answer the dequeue question?
https://theeventscalendar.com/support/forums/topic/events-calendar-3-0-not-working-with-theme/#post-54305No apologies needed.
July 10, 2013 at 11:37 am #54322CinchParticipantYes, but not why you think dequeueing is a potentially bad idea…
July 10, 2013 at 11:41 am #54323Andy FragenModeratorWell, Modern Tribe loads what they consider “necessary” CSS files based upon the user’s settings. I guess I’m not really sure what you’re trying to accomplish by dequeuing the plugin’s CSS and enqueuing it in your theme.
July 10, 2013 at 11:54 am #54326CinchParticipantI wouldn’t be enqueuing through the theme… I’d be adding it to my main css file. The main reason is to not load 7 files, but one. One that is minified and being loaded anyway.
July 10, 2013 at 12:21 pm #54330Andy FragenModeratorBut to what end? It won’t be significantly faster and using wp_enqueue_style is the correct way of loading CSS.
If your adding all the CSS to your theme style.css you can run into an issue if the plugin CSS ever changes.
July 10, 2013 at 2:23 pm #54375CinchParticipantI agree that using wp_enqueue_style is correct, but separating them into 7 separate http requests feels excessive. Thanks for all the help, I appreciate it.
July 10, 2013 at 3:30 pm #54394Cynthia LockleyParticipant@Jonah West,
It would help a lot if the details you provided above on 6 July were added to the Themer’s Guide. It isn’t much of a guide without some “how to do it” instructions. Here is the information you gave above that would be helpfup to all:
[code]Currently there is only one template option available within our plugin in the Events > Settings > Display screen. Based upon that option you will need to do some additional work to get the layout the way you want on any given page with a mixture of PHP, HTML and CSS. Fortunately, each events page contains a page specific body class which you can use to make some of your CSS styling a bit easier. For example, when on the calendar/gridview, there will be a body class of .events-gridview – on the list view there will be a body class of .events-list – this means that you can apply different CSS styling by prefixing your CSS with those classes, i.e.:.events-gridview #sidebar {
display: none;
}
.events-list #sidebar {
float: left;
width: 300px;
}You can also modify the selected template’s markup to adjust things as well. To do that first find out what template you are using in Events > Settings > Display. If you have selected the Default Events Template, the plugin will use the /wp-content/plugins/the-events-calendar/views/default-template.php template file for the display. You can override and edit this by making a copy and placing in an ‘tribe-events’ folder in your theme.
All of the other Events Template options will use one of your available theme page templates (page.php, full-width.php, etc.) which you can also edit.
Based upon what Events Template option you’ve chosen, you will need to use these conditional wrappers to help you conditionally display or not display certain markup on each corresponding events page: https://gist.github.com/jo-snips/2415009%5B/code%5D
July 10, 2013 at 3:33 pm #54395Cynthia LockleyParticipantI was trying to set off @Jonah’s words with [code] but somehow the [/code] got included in the link at the end. There isn’t a way to edit these posts.
July 10, 2013 at 11:43 pm #54454sparkupartsParticipantI’m using the Genesis theme, and have the same problem. When Default Page Template is selected, the #sidebar is put inside the #content div for some reason, it seems to be missing a closing div. So my quick fix was adding end tag in the text box that says “Add HTML after event content” (in text view) under Display Settings. Worked for me. Maybe not for everyone, but puts the sidebar in the correct place when using Genesis and the Default Page Template setting
July 10, 2013 at 11:47 pm #54455sparkupartsParticipantSorry, keep forgetting these comments strip code. Try again. Add:
< / div >
in the “Add HTML after event content” text boxJuly 11, 2013 at 5:07 am #54474tabitagreenParticipant@sparkuparts – you just made my day. 🙂
-
AuthorPosts
- The topic ‘Events Calendar 3.0 Not Working with Theme’ is closed to new replies.