Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- add_filter('wpseo_title','my_custom_titles');
- function my_custom_titles($title) {
- global $wp_query;
- if( tribe_is_month() && !is_tax() ) { // Month View Page
- return 'Events Calendar | Reshet Ramah';
- } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
- return 'Events Calendar' . ' | ' . single_term_title('', false);
- } elseif( tribe_is_event() && is_single() ) { // Single Events
- return get_the_title() . ' | Reshet Ramah';
- } elseif( tribe_is_day() ) { // Single Event Days
- return 'Events on: ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
- } elseif( tribe_is_venue() ) { // Single Venues
- return get_the_title() . ' | Reshet Ramah Events';
- } elseif( tribe_is_map() && !is_tax() ) { // Map View Page
- return 'Events by Location | Reshet Ramah';
- } elseif( tribe_is_map() && is_tax() ) { // Map View Category Page
- return 'Location Event Categories | Reshet Ramah';
- } elseif( tribe_is_photo() && !is_tax() ) { // Photo View Page
- return 'Events Photo View | Reshet Ramah';
- } elseif( tribe_is_photo() && is_tax() ) { // Photo View Category Page
- return 'Events Categories | Reshet Ramah';
- } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
- return 'Upcoming Events | Reshet Ramah';
- } elseif( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) { // List View Page
- return 'Events List | Reshet Ramah';
- } else {
- return $title;
- }}?>
- <?php
- add_filter('wpseo_metadesc','my_custom_desc');
- function my_custom_desc($the_meta) {
- global $wp_query;
- if( tribe_is_month() && !is_tax() ) { // Month View Page
- return 'Search for Reshet Ramah alumni events happening across the country. Filter by date, location, or type of event.';
- } elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
- return 'Filter Reshet Ramah alumni events by category. Search for your favorite type of events from trivia nights to weekend reunions.';
- } elseif( tribe_is_event() && is_single() ) { // Single Events
- return 'Read more to see details about ' . get_the_title() . ' on ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
- } elseif( tribe_is_day() ) { // Single Event Days
- return 'View detailed information about all Reshet Ramah events happening on: ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
- } elseif( tribe_is_venue() ) { // Single Venues
- return 'View detailed information about all Reshet Ramah events happening at ' . get_the_title();
- } elseif( tribe_is_map() && !is_tax() ) { // Map View Page
- return 'Find Reshet Ramah alumni events all around the world. Map view allows you to easily search through all Ramah alumni events and filter down just to events in your city.';
- } elseif( tribe_is_photo() && !is_tax() ) { // Photo View Page
- return 'View a detailed photo grid of all Reshet Ramah events happening around the globe. Search by location and date to find the alumni event most convenient for you.';
- } elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
- return 'Search for Reshet Ramah alumni events happening across the country in an easy to use event list view. Filter by date, location, or type of event.';
- } elseif( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) { // List View Page
- return 'Find Reshet Ramah alumni events all in one list. Event list view allows you to easily sort through all Ramah alumni events happening nationwide.';
- } else {
- return $title;
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement