Changeset 9460
- Timestamp:
- 02/04/2020 12:14:58 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/functions.php
r9454 r9460 130 130 131 131 /** 132 * Outputs `noindex,follow` robots tag for search results. 132 * Outputs `noindex,follow` robots tag for appropriate pages. 133 * 134 * Currently output for: 135 * - empty job category archives 136 * - search results 133 137 */ 134 function jobswp_noindex_for_search() { 135 if ( is_search() ) { 138 function jobswp_noindex() { 139 global $wp_query; 140 141 if ( 142 is_search() 143 || 144 ( is_tax( 'job_category' ) && 0 === $wp_query->found_posts ) 145 ) { 136 146 wp_no_robots(); 137 147 } 138 148 } 139 add_action( 'wp_head', 'jobswp_noindex _for_search', 9 );149 add_action( 'wp_head', 'jobswp_noindex', 9 ); 140 150 141 151 /**
Note: See TracChangeset
for help on using the changeset viewer.