Support

Home Forums Event Espresso Premium styling of the event list short code and detail pages

styling of the event list short code and detail pages

Posted: September 10, 2014 at 3:24 am

Viewing 10 reply threads


Christopher David

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.


Dean

September 10, 2014 at 3:42 am

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/


Christopher David

September 10, 2014 at 4:36 am

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 (
‘post_type’ => ‘espresso_events’,
‘post_status’ => ‘publish’,
‘orderby’ => ‘event-date’,
‘order’ => ‘asc’,
//’category_name’ => ‘maestro-series-1409680514’,
‘tax_query’ => array(
array(
‘taxonomy’ => ‘espresso_event_categories’,
‘field’ => ‘term_id’,
‘terms’ => ’20’,
),
),
);

Do do the two get tired together? Thanks again,


Christopher David

September 10, 2014 at 4:37 am

I am sorry. The last line should be How do the two get tied together.


Christopher David

September 10, 2014 at 5:37 am

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.

http://www.cabmusic.org/events/heavenly-mozart-test-event/


Dean

September 10, 2014 at 5:49 am

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.


Christopher David

September 10, 2014 at 7:11 am

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


Lorenzo Orlando Caum

  • Support Staff

September 10, 2014 at 8:42 am

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/


Lorenzo


Christopher David

September 10, 2014 at 9:04 am

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.


Christopher David

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?


Dean

September 11, 2014 at 4:05 am

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=””).

Viewing 10 reply threads

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.

Event Espresso