Home › Forums › Calendar Products › Events Calendar PRO › targeting the theme page
- This topic has 5 replies, 3 voices, and was last updated 10 years, 8 months ago by
Support Droid.
-
AuthorPosts
-
August 3, 2015 at 9:34 am #992774
John Paul
ParticipantHi
I am using my Theme Page as the default. If you look at the top of the page at http://ltdesigns.eu/events/
you will see I have a fair amount of white space between the menu and the events. I am trying to use some CSS to target that row and take it out…but I just cannot seem to get the right div targets to make this happen. This is what I have (btw the theme is called iMedica)#tribe-events .tribe-events-list .theme-showcase .imedica-page-header {
display: none !important;
}what am I doing wrong here?? it seems like this should work.
I also want to target the title “Upcoming Events” to read “Upcoming Courses” … I guess that is all in the single-event.php or is it from a Global php file that every template uses??
also, I am happy to write a short piece that shows how I brought together some various tutorials in the forum/ KB to create the look I have in “Photo view” if you think it is good enough……
August 3, 2015 at 12:46 pm #992851John Paul
ParticipantI also want to target the title “Upcoming Events” to read “Upcoming Courses” … I guess that is all in the single-event.php or is it from a Global php file that every template uses??………….I found one of your tutorials that helped me fix most of this…I added the following code into my child theme functions.php file
which fixed most of my issue..but I still se “Events” in the title for Month and Week view… I tried adding another variable i.e $tribe_is_month…..but no bannna…do I wonder how I might target the month and week titles
add_filter(‘tribe_get_events_title’, ‘change_upcoming_events_title’);
function change_upcoming_events_title($title) {
// Safe detection of photo/map views (in case PRO is not installed or becomes deactivated)
$tribe_is_map = function_exists( ‘tribe_is_map’ ) && tribe_is_map();
$tribe_is_photo = function_exists( ‘tribe_is_photo’ ) && tribe_is_photo();// We’ll change the title on upcoming, map and photo views
if ( tribe_is_upcoming() or $tribe_is_map or $tribe_is_photo ) return ‘Upcoming Courses’;// In all other circumstances, leave the original title in place
return $title;
}August 3, 2015 at 1:06 pm #992864John Paul
ParticipantOkay , so I found this in another help post and added it to my functions.php
function events_to_something_else( $txt ) {
//Only override the text on month view
if( tribe_is_month() ) {
$txt = str_replace( ‘Events for’, ‘Courses for’, $txt );
}return $txt;
}but it didnt work…any thoughts?
August 3, 2015 at 1:07 pm #992866John Paul
Participantsorry..I didnt copy the whole code in here….still not working
add_filter( ‘gettext’, ‘events_to_something_else’ );
function events_to_something_else( $txt ) {
//Only override the text on month view
if( tribe_is_month() ) {
$txt = str_replace( ‘Events for’, ‘Courses for’, $txt );
}return $txt;
}August 3, 2015 at 1:27 pm #992877Brian
MemberHi,
Thanks for using Pro. I can help out here.
I got this css to remove that white space on event templates:
.tribe-is-responsive .breadcrumbs {
display: none;
}As for changing the wording of events.
You can try out the first snippet here and that might get all of it for you:
https://gist.github.com/jesseeproductions/f4b175d407efa48564a9
Changes Class and Classes to what you would like it to be.
Let me know how that works out.
Thanks
August 18, 2015 at 7:05 am #996946Support Droid
KeymasterThis topic has not been active for quite some time and will now be closed.
If you still need assistance please simply open a new topic (linking to this one if necessary)
and one of the team will be only too happy to help. -
AuthorPosts
- The topic ‘targeting the theme page’ is closed to new replies.
