Changing the word ‘events’ to something else Php Schnipsel
-
Hello wp community
I tried to do the following“Occasionally, users may not want to use the word” events “in their calendar, and instead want to use something like” meetings. “With events 3.10 and beyond, you can do that with a brief snippet.
The snippet below will change the “event” words, and “events” on your site. Copy the code into your theme’s function.php file. Be sure to match the change to the “meeting” and “meetings” the words that you want to use instead. ”
<?php
// Singular
add_filter( ‘tribe_event_label_singular’, ‘event_display_name’ );
function event_display_name() {
return ‘Meeting’;
}
add_filter( ‘tribe_event_label_singular_lowercase’, ‘event_display_name_lowercase’ );
function event_display_name_lowercase() {
return ‘meeting’;
}
// Plural
add_filter( ‘tribe_event_label_plural’, ‘event_display_name_plural’ );
function event_display_name_plural() {
return ‘Meetings’;
}
add_filter( ‘tribe_event_label_plural_lowercase’, ‘event_display_name_plural_lowercase’ );
function event_display_name_plural_lowercase() {
return ‘meetings’;
}`Now I have the PHP Coad inserted into my topic-related function.php
Then I got an error message and always in the 4 line of the newly inserted php Coad ( function event_display_name() {
)Does someone have a solution for me?
- The topic ‘Changing the word ‘events’ to something else Php Schnipsel’ is closed to new replies.