View difference between Paste ID: n7dqCcsN and EeLvdrfS
SHOW: | | - or go back to the newest paste.
1
<?php
2
3
add_filter('wpseo_title','my_custom_titles');
4
function my_custom_titles($title) {
5
	global $wp_query;
6
	
7-
if( tribe_is_month() && !is_tax() ) { // Month View Page
7+
	if( tribe_is_month() && !is_tax() ) { // Month View Page
8
		return 'Events Calendar | Reshet Ramah';
9
	} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
10
		return 'Events Calendar' . ' | ' . single_term_title('', false);
11
	} elseif( tribe_is_event() && is_single() ) { // Single Events
12
		return get_the_title() . ' | Reshet Ramah';
13
	} elseif( tribe_is_day() ) { // Single Event Days
14
		return 'Events on: ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
15
	} elseif( tribe_is_venue() ) { // Single Venues
16
		return get_the_title() . ' | Reshet Ramah Events';
17
	} elseif( tribe_is_map() && !is_tax() ) { // Map View Page
18
		return 'Events by Location | Reshet Ramah';
19
	} elseif( tribe_is_map() && is_tax() ) { // Map View Category Page
20
		return 'Location Event Categories | Reshet Ramah';
21
	} elseif( tribe_is_photo() && !is_tax() ) { // Photo View Page
22
		return 'Events Photo View | Reshet Ramah';
23
	} elseif( tribe_is_photo() && is_tax() ) { // Photo View Category Page
24
		return 'Events Categories | Reshet Ramah';
25
	} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
26
		return 'Upcoming Events | Reshet Ramah';
27
	} elseif( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) { // List View Page
28
		return 'Events List | Reshet Ramah';
29
	} else {
30
		return $title;
31-
}}?>
31+
32
}
33
34
35
add_filter('wpseo_metadesc','my_custom_desc');
36
function my_custom_desc($the_meta) {
37
	global $wp_query;
38
	
39-
if( tribe_is_month() && !is_tax() ) { // Month View Page
39+
	if( tribe_is_month() && !is_tax() ) { // Month View Page
40
		return 'Search for Reshet Ramah alumni events happening across the country. Filter by date, location, or type of event.';
41
	} elseif( tribe_is_month() && is_tax() ) { // Calendar Category Pages
42
		return 'Filter Reshet Ramah alumni events by category. Search for your favorite type of events from trivia nights to weekend reunions.';
43
	} elseif( tribe_is_event() && is_single() ) { // Single Events
44-
		return 'Read more to see details about ' . get_the_title() . ' on ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
44+
		return 'Read more to see details about ' . get_the_title() . ' on ' . date('F j, Y', strtotime(tribe_get_start_date()));
45
	} elseif( tribe_is_day() ) { // Single Event Days
46
		return 'View detailed information about all Reshet Ramah events happening on: ' . date('F j, Y', strtotime($wp_query->query_vars['eventDate']));
47
	} elseif( tribe_is_venue() ) { // Single Venues
48
		return 'View detailed information about all Reshet Ramah events happening at ' . get_the_title();
49
	} elseif( tribe_is_map() && !is_tax() ) { // Map View Page
50
		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.';
51
	} elseif( tribe_is_photo() && !is_tax() ) { // Photo View Page
52
		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.';
53
	} elseif( tribe_is_event() && !tribe_is_day() && !is_single() ) { // The Main Events List
54
		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.';
55
	} elseif( tribe_is_past() || tribe_is_upcoming() && !is_tax() ) { // List View Page
56
		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.';
57
	} else {
58
		return $the_meta;
59
	}
60
}