Posted: August 17, 2016 at 1:55 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. 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? |
Hi Joe, You can hide the event date for specific events on the grid view page with some CSS like this:
In the above example, 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:
Then you change the conditional to include a check for $show_dates:
Then you edit the event and add a custom field like this. |
|
|
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 );
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? |
1) what if I wanted to hide all there dates in grid view ? It’d be
instead.
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. |
|
|
where do I find the content-espresso_events-datetimes.php file? |
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. |
|
|
/clairescreativeadventures.com/wp-content/themes/iced-mocha-master/templates its not in there? |
|
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 |
That’s output from:
You’ll find something like this:
Remove it from the template to remove that date. |
|
|
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?? |
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? |
|
|
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 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() { 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 // Add some more strings here // See if the current string is in the $strings array 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 |
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:
Yes, you can place the functions within functions.php of the child theme.
You would change that using CSS which you can place within the styles.css file of the child theme. |
|
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.