Support

Home Forums Event Espresso Premium White background for excerpt covers picture, remove event date from excerpt area

White background for excerpt covers picture, remove event date from excerpt area

Posted: August 17, 2016 at 1:55 pm

Viewing 14 reply threads


Joe Mangrum

August 17, 2016 at 1:55 pm

text over

event showing white area behind excerpt


Joe Mangrum

August 17, 2016 at 2:02 pm

The top pic shows me hovering over the grid template which shows the event start date can we remove this, can it be done to remove from only specific events?

The idea is to gather inquiry info for a create your own class and feel have date is confusing?

also people wanting to book a birthday party would see this and be confused.

while is would be ok to eliminate the date altogether from both grid view and the event detail view shown, Can it be done for specific events individually ??

Second question is about the white area that covers the pictures.
If the date is excluded, then the area would be smaller,so would like to do that. Is there also a way to adjust purple font size in MY css?

just for event pages

Ideally if it all could fit in the bottom 20% of picture without covering so much

also adjusting text size of the excerpt would help a bit?

Please let me know if there are ways to accomplish this?


Josh

  • Support Staff

August 17, 2016 at 3:58 pm

Hi Joe,

You can hide the event date for specific events on the grid view page with some CSS like this:

#a_register_link-4042 .start-date {
display: none;
}

In the above example, 4042 is the event ID. So you can change the ID to match the ID of the event you want to hide the date for.

Then for the event detail view, I’d recommend using a custom field and some custom PHP in a template to selectively remove dates. To set up support for a custom field you first copy over the content-espresso_events-datetimes.php template into your WordPress child theme (or if you’re making customizations directly to the Iced Mocha theme, then I guess no need for a child theme).

Then you add this line after the opening php tag:

$show_dates = get_post_meta( get_the_ID(), 'show_dates', true );

Then you change the conditional to include a check for $show_dates:

if ( is_single() && $show_dates != 'no' || is_archive() && espresso_display_datetimes_in_event_list() ) :

Then you edit the event and add a custom field like this.


Joe Mangrum

August 17, 2016 at 4:10 pm

Ok great, thanks again Josh, very helpful,

1) what if I wanted to hide all there dates in grid view ?

2)The `$show_dates = get_post_meta( get_the_ID(), ‘show_dates’, true );
`
Gets placed into MYCSS as well as the second part?

if ( is_single() && $show_dates != 'no' || is_archive() && espresso_display_datetimes_in_event_list() ) :

Sorry im not clear? Then on the specific events pages I create the custom fields?

Both of those code snippets go into my custom CSS?


Josh

  • Support Staff

August 17, 2016 at 4:19 pm

1) what if I wanted to hide all there dates in grid view ?

It’d be

.start-date {
display: none;
}

instead.

Gets placed into MYCSS as well as the second part?
Both of those code snippets go into my custom CSS?

No and No. That’s PHP code and therefore does not go into a custom CSS field.

To set up support for a custom field you first copy over the content-espresso_events-datetimes.php template into your WordPress child theme (or if you’re making customizations directly to the Iced Mocha theme, then I guess no need for a child theme). It’s best practice to set up a child theme before you begin to make theme modifications.

When you keep your modifications within the child theme, it will preserve your changes should the theme need to be updated in the future.


Joe Mangrum

August 17, 2016 at 4:27 pm

where do I find the content-espresso_events-datetimes.php file?


Josh

  • Support Staff

August 17, 2016 at 4:36 pm

It appears that your site has the Iced Mocha theme, so in that case, you’d find it in the Iced Mocha theme’s templates folder.


Joe Mangrum

August 17, 2016 at 4:41 pm

/clairescreativeadventures.com/wp-content/themes/iced-mocha-master/templates

its not in there?


Josh

  • Support Staff

August 17, 2016 at 5:19 pm

https://github.com/eventespresso/iced-mocha/blob/master/content/espresso/content-espresso_events-datetimes.php


Joe Mangrum

August 17, 2016 at 5:58 pm

Thanks Josh for your patience, while those edits did take out the dates in Grid View!! Yay and the dates on the event listing itself, the date as shown above in the transparent white area that contains the rest of the text from the excerpt is still there….

refer to pic above with little boy and at the bottom is the date sept 26th

also viewed here on live site want to eliminate date in transparent white area


Tony

  • Support Staff

August 18, 2016 at 5:48 am

That’s output from:

\iced-mocha\content\espresso\content-espresso_events-header.php

You’ll find something like this:

<p id="event-date-p">
	<?php 
	if ( isset( $post->EE_Event ) && $post->EE_Event instanceof EE_Event ) {
		echo $post->EE_Event->primary_datetime()->start_date_and_time(); 
	}				
	?>
</p>

Remove it from the template to remove that date.


Joe Mangrum

August 18, 2016 at 10:48 am

Thanks Tony,

that worked but i was wondering if it should go ito child theme and I tried but it did not work?

when I remove that snippet from the main theme it works?

Just wondering if its something that will effected by updates to the theme??
appreciate all your help


Tony

  • Support Staff

August 18, 2016 at 1:21 pm

Just wondering if its something that will effected by updates to the theme??

Any code changes, be it within a plugin or theme will be lose if you update that plugin/theme so yes you should be using a child theme if altering the templates.

Where did you place the template within the child theme?


Joe Mangrum

August 19, 2016 at 1:08 am

I placed it in the child theme like this but did not work so I edited the main file

clairescreativeadventures.com/wp-content/themes/iced-mocha-child/content-espresso_events-header.php

the main files here :

clairescreativeadventures.com/wp-content/themes/iced-mocha-master/content/espresso/content-espresso_events-header.php

I also have a site plugin `<?php
/*
Plugin Name: Site plugin for clairescreativeadventures.com
Description: Site specific code for clairescreativeadventures.com
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
function ee_proceed_to_button( $submit_button_text, EE_Checkout $checkout ) {
if ( ! $checkout instanceof EE_Checkout || ! $checkout->current_step instanceof EE_SPCO_Reg_Step || ! $checkout->next_step instanceof EE_SPCO_Reg_Step ) {
return $submit_button_text;
}
if ( $checkout->next_step->slug() == ‘payment_options’ ) {
$submit_button_text = ‘Finalize Pre-Registration’;
}
return $submit_button_text;
}

add_filter ( ‘FHEE__EE_SPCO_Reg_Step__set_submit_button_text___submit_button_text’, ‘ee_proceed_to_button’, 10, 2 );

function ee_register_now_button() {
return ‘Pre-Register’;
}

add_filter (‘FHEE__EE_Ticket_Selector__display_ticket_selector_submit__btn_text’, ‘ee_register_now_button’);

function tw_custom_filter_gettext( $translated, $original, $domain ) {

// This is an array of original strings
// and what they should be replaced with
$strings = array(
‘Ticket Options’ => ‘Registering For’,

// Add some more strings here
);

// See if the current string is in the $strings array
// If so, replace its translation
if ( isset( $strings[$original] ) ) {
// This accomplishes the same thing as __()
// but without running it through the filter again
$translations = get_translations_for_domain( $domain );
$translated = $translations->translate( $strings[$original] );
}

return $translated;
}

add_filter( ‘gettext’, ‘tw_custom_filter_gettext’, 10, 3 );

/* Stop Adding Functions */`

could it be placed in there?

One last question is to change the size of the Purple font and excerpt font above I would imagine its in the same file??

again thanks for your help


Tony

  • Support Staff

August 19, 2016 at 4:58 am

clairescreativeadventures.com/wp-content/themes/iced-mocha-child/content-espresso_events-header.php

the main files here :

clairescreativeadventures.com/wp-content/themes/iced-mocha-master/content/espresso/content-espresso_events-header.php

The location of the file within the child theme must match the location of the file within the parent so in your child theme place the file within:

/themes/iced-mocha-child/content/espresso/

could it be placed in there?

Yes, you can place the functions within functions.php of the child theme.

One last question is to change the size of the Purple font and excerpt font above I would imagine its in the same file??

You would change that using CSS which you can place within the styles.css file of the child theme.

Viewing 14 reply threads

The support post ‘White background for excerpt covers picture, remove event date from excerpt area’ 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