Posted: September 10, 2014 at 3:24 am
|
I have read through all the e4 documentation but I still am a bit lost. I would like to style the following short code that is placed on one of my pages. [ESPRESSO_EVENTS css_class=”my-custom-class” category_slug”my-category-slug”] Where in the code can I do this? Also I would like to style the event details page but I am also having difficulty finding the correct source for that. I did create 4 separate template-“page”.php pages to create lists in my child theme folder but I am also having difficulty pulling the venue info with standard wordpres calls. Any help would be great. |
|
Hi, Regarding the styling, you would use CSS to change the looks. The CSS can be added to your themes style.css file (theme updates will over write theses changes), a custom styles section in your theme options, a child themes style.css or a plugin such as My Custom CSS. Personally I would go with My Custom CSS, it’s easy to use. If for example you use the shortcode [ESPRESSO_EVENTS css_class=”my-custom-class”] Adding CSS like this .my-custom-class { background-color: #eee; padding: 20px; border-radius: 20px; border: #666 thin dashed !important; } would result in an event list styled like this: http://take.ms/fU9ZY Regarding the individual events, these wont use the my-custom-css class, you could however use something like this: .single-espresso_events article { background-color: #eee; padding: 20px; border-radius: 20px; border: #666 thin dashed !important; } Regarding pulling venue information in, that does get more complicated as you’re venturing into template modifications and object orientated PHP. This list of template tags may help https://eventespresso.com/wiki/ee4-themes-templates/ |
|
Thanks for the respnse. Can you provide the php example for the $args for the venue info. For example have the following for the events. $args = array ( Do do the two get tired together? Thanks again, |
|
I am sorry. The last line should be How do the two get tied together. |
|
Also this is the page I need to style as soon as I can. A simple CCS edit is not going to get the job done. I need to completely redesign the contents of this page by aligning a featured image to the left and reordering the event elements in the body including the venue to right. |
|
Hi, The events and venues are separate (both custom post types). They are linked via a database table called esp_event_venue. However, the tags I listed above can be used. For example if in your loop you added it would echo the venue name associated with that event. Here’s a basic loop that outputs event names and the venue name: http://pastebin.com/neqpX0k3 It’s quite rough but might get you along the right track. |
|
Thanks so much I got the venue info pulling and displaying. Any thoughts on the code I can modify to style this page: http://www.cabmusic.org/events/heavenly-mozart-test-event/ Thanks |
Hi Christopher, Please give this a try: https://eventespresso.com/topic/change-event-layout-page-is-there-an-easier-way/#post-113655 Here are some other resources: https://eventespresso.com/2014/02/developers-corner-theming-event-espresso-4/ — |
|
|
Awesome! this helps and explains a lot. Do you have the php code for the box that contains the available ticket(s) with the quantities and the button register now. I do see “espresso_event_tickets_available()” but this returns a list and not the active form. Thanks so much guys. |
|
September 10, 2014 at 11:00 am So I found the short code [espresso_ticket_selector event=”event id here”] and it is doing what I want but what is the event espresso code to place the event id in the short code in real time? |
|
Hi, It depends on where the shortcode is being called, but if it is in the loop it would be like this: ID. '"]'); ?> (note it is event_id=”” not event=””). |
The support post ‘styling of the event list short code and detail pages’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.