Home › Forums › Calendar Products › Events Calendar PRO › Events homepage showing individual event titles
- This topic has 33 replies, 5 voices, and was last updated 11 years, 3 months ago by Jonah.
-
AuthorPosts
-
December 4, 2012 at 12:32 pm #28929LauraMember
Hi Jonah. Thank you so much for your prompt reply! Here is the URL to the snippi code of my functions.php: http://snippi.com/s/og54p2j
December 4, 2012 at 1:05 pm #28931LauraMemberBTW, this is the code I added to the functions.php file and got the one line of error for a web site. 🙂
does it matter where in the file it goes?
it’s also possible i copied the code as it appeared on the page and it may have selected the line #s. i can’t remember which i did, but i’m afraid to risk it again. Shall I retry and send you the error code too?
add_filter(‘tribe_get_events_title’, ‘my_get_events_title’);
function my_get_events_title($title) {
if( tribe_is_month() && !is_tax() ) { // The Main Calendar Page
return $title;
} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
return $title;
} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
return ‘Events List’;
} elseif( tribe_is_event() && is_single() ) { // Single Events
return $title;
} elseif( tribe_is_day() ) { // Single Event Days
return ‘Events for – ‘ . tribe_get_start_date(false, false, ‘F, Y’);
} elseif( tribe_is_venue() ) { // Single Venues
return $title;
} else {
return $title;
}
}December 5, 2012 at 9:42 am #28982JoshParticipantHello. I’ve tried the same code above on my site and got the error shown here:
http://mendogeotours.com/wp-content/uploads/2012/12/EventsCalendarError_120512.png
Line 10 is this:
return ‘Events List’;
}Any guidance?
December 5, 2012 at 10:59 am #28992JonahParticipant@Laura, ok the problem is PHP is closed at the end of your functions.php file. So, either remove that last ?> to unclose PHP or open it back up before the code I provided with
December 5, 2012 at 1:30 pm #29002TomMemberJonah,
I don’t doubt that solution you’ve previously posted will work it’s just that it’s hard for me to understand what steps to take. For example, I don’t know how to find the page title references in my theme. Do I need to find every reference to page title? What effect will this have on the site overall? Currently my events page http://www.seven44.com/events has the title of a past event. In clear step by step instructions, how can I change the title on this page to “Upcoming Events”?
December 5, 2012 at 3:55 pm #29011JoshParticipantHere’s the snippet. Entering into functions.php in the child theme
http://snippi.com/s/51raf3m
thanks
JDecember 5, 2012 at 6:10 pm #29015LauraMemberHi again, Jonah. You are the best. Never had such prompt support! I’ve done as you requested and embedded the title code in my functions.php page and it worked this time, meaning that it didn’t blow my site offline like the first time, so thank you! However, it’s not affecting the title issue on the Events calendar home page; it still shows the title of the first event. I think I might not be understanding what you mean about ‘modify as necessary.’ Could you possibly explain this? Thank you so much. -Laura
http://markylennon.server289.comDecember 6, 2012 at 9:16 am #29057JonahParticipant@Josh – two things, one, make sure you are properly placing new PHP code in your functions.php file. If PHP is open “
December 6, 2012 at 5:03 pm #29101LauraMemberIf you can figure it out, Jonah, I never will. 🙁
It seems it’s overlaying the Events Default Template over a Page Template, showing the title of an event, but also showing the design elements of dividers horizontally across the top where they appear on posts and pages beneath their titles and the vertical rule that delineates the right sidebar. Is there a way to figure out how/why the Events Default Template might be doing that? Thank you!December 7, 2012 at 12:58 pm #29135JonahParticipantHi Laura,
Sorry but you are going to need to work this out on your own or hire someone to help you. Good luck!
– Jonah
December 7, 2012 at 5:08 pm #29151JoshParticipantJonah what was the 2nd thing above? I only see one. Thanks. J
December 8, 2012 at 3:57 pm #29169JoshParticipantHi Jonah
I’ve been through your FAQ and followed al lthe threads above hoping for a resolution. This is the code I’m using in functions.php:
I left the PHP open and stopped getting the error noted above, but still am only getting a single event title where I need it to read “Calendar of Events”. What am I missing?
Thanks for any help
JoshDecember 9, 2012 at 7:18 pm #29179JoshParticipantHi Jonah,
I’m thinking another direction might be to modify the events default template as that one pulls the right title “Calendar of Events”, even though it extends wider than the main content area.
What I need to know is how to constrain the width of the Calendar view to 960 pixels. Can you point me in the right direction?
Thanks
JoshDecember 10, 2012 at 9:59 pm #29212JonahParticipantHi Josh,
The code you posted above won’t do anything in functions.php – you’ll would need to add that to an actual template file like page.php or the ecp-page-template.php depending on what Template option you have set in the in the plugin settings. To constrain the width of the template, your best bet is to modify ecp-page-template.php (make a copy first and place in an ‘events’ folder in your theme) and add the necessary HTML code your theme uses to “wrap” the content on any given page. You can take a look at page.php for an example of this.
I hope that helps!
– Jonah
December 11, 2012 at 8:19 am #29231TomMemberPlease help. I’m currently using the full width page template on my theme.
http://www.seven44.com/events
What specific steps should I take to replace the page title with “Events Calendar”? -
AuthorPosts
- The topic ‘Events homepage showing individual event titles’ is closed to new replies.