if( ! $requested_url && isset($_SERVER['HTTP_HOST'])){ // Build the URL in the address bar.
$requested_url = is_ssl() ? 'https://' : 'http://'; $requested_url .= $_SERVER['HTTP_HOST']; $requested_url .= $_SERVER['REQUEST_URI']; }
<?php get_search_form(); ?>
</li>
<!-- Author information is disabled per default. Uncomment and fill in your details if you want to use it.
<li><h2><?php _e( 'Author' ); ?></h2>
<p>A little something about you, the author. Nothing lengthy, just an overview.</p>
</li>
-->
<?php
if(is_404() || is_category() || is_day() || is_month() || is_year() || is_search() || is_paged()) : ?>
<li>
<?php if(is_404()) : /* If this is a 404 page */ ?>
<?php elseif(is_category()) : /* If this is a category archive */ ?>
<p>
<?php
printf( /* translators: %s: Category name. */ __( 'You are currently browsing the archives for the %s category.' ), single_cat_title( '', false ) );
global$page, $paged;
$title = array( 'title' => '', );
// If it's a 404 page, use a "Page not found" title.
if(is_404()){ $title['title'] = __( 'Page not found' );
// If it's a search, use a dynamic search results title.
}elseif(is_search()){ /* translators: %s: Search query. */ $title['title'] = sprintf(__( 'Search Results for “%s”' ), get_search_query());
if( ! isset($wp_query)){ _doing_it_wrong( __FUNCTION__, __( 'Conditional query tags do not work before the query is run. Before then, they always return false.' ), '3.1.0' ); return false; }
return$wp_query->is_search(); }
/**
* Determines whether the query is for an existing single post.
*
* Works for any post type, except attachments and pages
*
* If the $post parameter is specified, this function will additionally
* check if the query is for one of the Posts specified.
*
* For more information on this and similar theme functions, check out
* the {@link https://developer.wordpress.org/themes/basics/conditional-tags/
* Conditional Tags} article in the Theme Developer Handbook.
*
* @since 1.5.0
*
* @see is_page()
* @see is_singular()
* @global WP_Query $wp_query WordPress Query object.
*
* @param int|string|int[]|string[] $post Optional. Post ID, title, slug, or array of such
* to check against. Default empty.
* @return bool Whether the query is for an existing single post.
*/
/**
* Adds `noindex` to the robots meta tag.
*
* This directive tells web robots not to index the page content.
*
* Typical usage is as a {@see 'wp_robots'} callback:
*
* add_filter( 'wp_robots', 'wp_robots_no_robots' );
*
* @since 5.7.0
*
* @param array $robots Associative array of robots directives.
* @return array Filtered robots directives.
*/