[wp-trac] [WordPress Trac] #35644: this code create problam in my web site for search result hsa no result found so what can i do plz help me
WordPress Trac
noreply at wordpress.org
Thu Jan 28 12:57:34 UTC 2016
#35644: this code create problam in my web site for search result hsa no result
found so what can i do plz help me
--------------------------+-----------------------------
Reporter: rdubey | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.3
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
1
/**
* Display a noindex meta tag if required by the blog configuration.
*
* If a blog is marked as not being public then the noindex meta tag will
be
* output to tell web robots not to index the page content. Add this to
the wp_head action.
* Typical usage is as a wp_head callback. add_action( 'wp_head', 'index'
);
*
* @see wp_no_robots
*
* @since 2.1.0
*/
function noindex() {
// If the blog is not public, tell robots to go away.
if ( '0' == get_option('blog_public') )
wp_no_robots();
}
/**
* Display a noindex meta tag.
*
* Outputs a noindex meta tag that tells web robots not to index the page
content.
* Typical usage is as a wp_head callback. add_action( 'wp_head',
'wp_no_robots' );
*
* @since 3.3.0
*/
function wp_no_robots() {
echo "<meta name='robots' content='noindex,follow' />\n";
}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35644>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list