Support

Home Forums Event Espresso Premium Calendar Add-on: only show event title

Calendar Add-on: only show event title

Posted: April 24, 2018 at 10:20 pm


sliu

April 24, 2018 at 10:20 pm

Hello! Is there a way to display ONLY the event title within the calendar add-on? Right now it shows both the event title and the datetimes.

I did find a previous thread that suggested deleting the event datetimes altogether, but that doesn’t work for me because I also use the events table add-on, for which I do want the datetimes to show.

Also, how can I style the font size inside the calendar?

Thank you!


Tony

  • Support Staff

April 25, 2018 at 3:57 am

Hi Sherry,

To change the titles you can use this function:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-calendar/tw_ee_EE_Datetime_In_Calendar__to_array_for_json__title.php

Add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Also, how can I style the font size inside the calendar?

There are multiple sizes in use, which element are you looking to target?


sliu

April 25, 2018 at 3:22 pm

Hi Tony, the php worked beautifully, thank you so much!

In terms of styling the font, I was referring to the font used to list the events, within the calendar. Would that be fc-event-inner?

Also, as I progress, I’m finding I have new questions:

I’m using the promo add-on, and can’t figure out how to style the output from [ESPRESSO_PROMOTIONS]. Could you point me in the right direction?

Also, I’m using the grid add-on to display “featured events”. Is there a way for the shortcode to either return nothing, or return “None at this time”, if we are not featuring any events?

Thank you again!


Josh

  • Support Staff

April 26, 2018 at 2:26 pm

#espresso_calendar .fc-event-title {
    font-size: 16px;
}

Will change the text size used to list the events within the calendar.

The Event Espresso > Promotions > Settings page has two options for changing the style of the Promotions banners, and the same settings automatically apply to the promotions shortcode.

If there’s something specific that’s not covered by the options, like text size or font-family, we can point you in the right direction on how to change those with CSS. May I ask what specifically are you looking to change there?

Also, I’m using the grid add-on to display “featured events”. Is there a way for the shortcode to either return nothing, or return “None at this time”, if we are not featuring any events?

Normally it would return nothing if there are no featured events.


sliu

May 1, 2018 at 7:40 pm

Thanks so much for all the help! For the promotions shortcode, I’m hoping to adjust the width of the box to full width. Right now the sales period is listed above the box, and I’m wondering if there’s a way to move that into the box. I would also like to change the background color.

Another new/unrelated question — during the checkout process, there are many buttons that refer to “Event”. Is there a way to remove the word “Event”, and in general modify the buttons?

For example:
– Add to Event Cart -> Add to Cart
– View Event Cart -> View Cart
– Empty Event Cart -> Empty Event Cart
– Update Event Cart -> Update Event Cart
– Return to Events List -> Return to List (Tangentially, rather than returning to the events list, is there a way to return to another page? I have another page set up to display events via the events table add-on and would prefer that to be the default events list.

Thank you again!


Tony

  • Support Staff

May 2, 2018 at 11:35 am

For the promotions shortcode, I’m hoping to adjust the width of the box to full width. Right now the sales period is listed above the box, and I’m wondering if there’s a way to move that into the box. I would also like to change the background color.

Can you link me to an event I can use to view this?

Another new/unrelated question — during the checkout process, there are many buttons that refer to “Event”. Is there a way to remove the word “Event”, and in general modify the buttons?

For some sections, the ‘Event cart’ string is linked and you can use a single function to change it, start with this function:

https://gist.github.com/Pebblo/2873e08d239e5e82435045bf73521770

Then check to see which other strings you want to change.

Tangentially, rather than returning to the events list, is there a way to return to another page? I have another page set up to display events via the events table add-on and would prefer that to be the default events list.

Yes, you can use this fucntion:

https://gist.github.com/joshfeck/e51ac13a3d9fd345ad40

Change line 2 to the URL you want to use and that be used by the button.


sliu

May 3, 2018 at 3:01 pm

Amazing! That was much easier than I imagined, thank you so much!

One more string I would like to change is the button that says “Return to Event List” -> “Return to List”. Is this also doable with a single function?

I am including an image here showing how [ESPRESSO_PROMOTIONS] displays for me.


Tony

  • Support Staff

May 4, 2018 at 5:05 am

One more string I would like to change is the button that says “Return to Event List” -> “Return to List”. Is this also doable with a single function?

For that you’ll need this function:

https://gist.github.com/Pebblo/385e46712013a3ee5908#file-ee-site-specific-plugin-php-L7-L11

I am including an image here showing how [ESPRESSO_PROMOTIONS] displays for me.

To make the promotions output full width you can use this CSS:

#ee-upcoming-promotions-dv {
    -moz-column-count: 1;
    -webkit-column-count: 1;
    column-count: 1;
}

Moving the dates can be done but it depends what you want to do with them. It may be easier for you to copy the template into your theme and edit the output to suit. To do that you copy:

\eea-promotions\templates\upcoming-promotions-grid.template.php

To the root directory of your theme (preferably using a child theme) and edit the template there.


sliu

May 4, 2018 at 11:52 am

Okay, I think I’m getting there.

For the promo code and ribbon, can we:
-change the background color
-move the date below the title
-change “Applies to the following Event(s):” to “Applies to the following:”

Like so:

LIMITED TIME ONLY!
April 12, 2018 10:10 am – June 30, 2018 10:10 am
Register Now to Receive 10% Off!
Applies to the following Event(s):
Sample Class
Sample Class 2


Josh

  • Support Staff

May 4, 2018 at 1:39 pm

Hi Sherry,

There are a few color options in the Promotions setting page. Beyond those, if you have a hex color code you can add CSS like this:

.ee-promo-upcoming-promotions-main-dv {
background-color: #f48c28 !important;
}

The other two changes can be made by editing the promotion banner’s template file. Here’s the steps to do that:

1) Like Tony mentioned before, you copy the upcoming-promotions-grid.template.php template from the promotions add-on plugin folder, and put the copy into your active WordPress theme.

To move the date, you move this code below the code for the title:
<div class="ee-promo-upcoming-promotions-dates-dv smaller-text"><?php echo $promo_dates; ?></div>

Then to change the text, you find this:
<b class="smaller-text"><?php printf( __( 'Applies to the following %1$s(s):', 'event_espresso' ), $promo_scope ); ?></b><br />

and change it to this:
<b class="smaller-text">Applies to the following:</b><br />


sliu

May 8, 2018 at 1:44 pm

PERFECT! Thank you so much for your help!

The support post ‘Calendar Add-on: only show event title’ 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