Forum Replies Created
-
AuthorPosts
-
January 19, 2016 at 4:28 pm in reply to: Fix for Next Events / More Events no longer working #1058915
Benjamin
ParticipantThanks George, that did the trick!
January 15, 2016 at 9:17 pm in reply to: Fix for Next Events / More Events no longer working #1056912Benjamin
ParticipantHere’s a link to the code from my functions file:
https://gist.github.com/anonymous/b58649144f442dde6c03
Thanks for taking a look!
January 14, 2016 at 6:06 pm in reply to: Fix for Next Events / More Events no longer working #1056288Benjamin
ParticipantGeorge,
It has something to do with these lines:
‘Previous %s’ => ‘Older %s’,
‘Next %s’ => ‘More %s’,Because when I remove it, it works.
When I leave that line in the code, my browser throws this error:
Parse error: syntax error, unexpected ‘=’, expecting ‘)’ in /home3/ab58849/public_html/wp-content/themes/fropo/functions.php on line 29
January 14, 2016 at 4:11 pm in reply to: Fix for Next Events / More Events no longer working #1056253Benjamin
ParticipantGeorge, thank you for your quick response!
The first step (changing Events to Classes) works for me, but when I added the snippet of code you’ve included below that I get a syntax error.
Here’s everything as I currently have it:
add_filter( ‘tribe_event_label_singular’, ‘event_display_name’ );
function event_display_name() {
return ‘Class’;
}add_filter( ‘tribe_event_label_plural’, ‘event_display_name_plural’ );
function event_display_name_plural() {
return ‘Classes’;
}// Change next classes to more classes
function tribe_custom_theme_text( $translations, $text, $domain ) {
$custom_text = array(
‘Previous %s’ => ‘Older %s’,
‘Next %s’ => ‘More %s’,
);if ( array_key_exists( $text, $custom_text ) ) {
$text = $custom_text[ $text ];
}return $text;
}add_filter( ‘gettext’, ‘tribe_custom_theme_text’, 20, 3 );
Benjamin
ParticipantThat did it.
Thanks!
Benjamin
ParticipantA couple more example customizations of varying types would help immensely. Right now the example customization is how to add the event organizer to the events calendar, so that covers how to add/display an existing field.
But one can easily imagine a couple common customizations which would be quite different:
1. Adding a calendar to a page
2. Changing the name of a field
I think adding these examples would really help the guide. Again, PHP is not my strong suit, but I imagine you have plenty of customers like me who are well versed in html/css and willing to tackle a “theme,” but could use some additional guidance here.
Thank you for your follow up!
All the best,
Ben
Benjamin
ParticipantWell it took me 4 hours, but I got it working!
I created the “child theme” file as the Themer’s Guider stipulated in the following location:
wp-content/themes/your-theme/tribe-events/default-template.php
And then I edited the default-template.php file adding this (with some extra rules specific to my site) beneath the calendar’s code:
<?php query_posts(‘pagename=home’); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php endwhile; else : ?>
<?php _e( ‘Sorry, no posts matched your criteria.’ ); ?>
<?php endif; ?>Note (for anyone else trying to do this): My page was called ‘home’ – this needs to be changed to your respective page name.
Also, for some reason I had to reset the query just before the footer or it did not display. I put this code just before the get footer:
<?php wp_reset_query(); ?>
This solution places a single page’s content above/below the Events Calendar. The ideal solution would add the calendar to a page (so you could have the calendar on multiple pages), but for my purposes on this site having the page in the calendar (so to speak) worked fine.
Barry,
While you’re investigating options, a better Themer’s Guide would have been super helpful. I felt like I spent a lot of time just figuring out what files did what. But admittedly I’m a php hack.
All the best,
Ben
February 11, 2015 at 5:38 pm in reply to: Is there a way to insert the calendar into a page and not just a dedicated page #941821Benjamin
ParticipantJosh, I’d like to do the same thing Brown mentioned. Specifically, I’m customizing a Divi theme and would like to use Page Builder to add a section with a contact form below the calendar.
I’ve used Event Rocket for posting calendar widgets before, but it does not support adding the entire calendar to a page. The only thing Event Rocket does for the entire calendar is add “Main Events Page” to the list of pages in Reading Settings, so you can set it as the homepage.
But importantly, Barry announced that they’re dropping support for the plug-in and encouraged folks to stop using it:
https://wordpress.org/support/topic/using-the-event_rocket_calendar-shortcode-read-this
Please advise.
-
AuthorPosts
