tag based on what is being viewed. * * @param string $title Default title text for current view. * @param string $sep Optional separator. * @return string The filtered title. */ function radcliffe_wp_title( $title, $sep ) { global $paged, $page; if ( is_feed() ) return $title; // Add the site name. $title .= get_bloginfo( 'name' ); // Add the site description for the home/front page. $site_description = get_bloginfo( 'description', 'display' ); if ( $site_description && ( is_home() || is_front_page() ) ) $title = "$title $sep $site_description"; // Add a page number if necessary. if ( $paged >= 2 || $page >= 2 ) $title = "$title $sep " . sprintf( __( 'Page %s', 'radcliffe' ), max( $paged, $page ) ); return $title; } add_filter( 'wp_title', 'radcliffe_wp_title', 10, 2 ); /** * Add classes to next_posts_link and previous_posts_link */ function radcliffe_next_posts_class() { return 'class="post-nav-older"'; } add_filter( 'next_posts_link_attributes', 'radcliffe_next_posts_class' ); function radcliffe_prev_posts_class() { return 'class="post-nav-newer"'; } add_filter( 'previous_posts_link_attributes', 'radcliffe_prev_posts_class' ); /** * Add classes to next_image_link and previous_image_link * * @param string $link. * @return string The filtered classname. */ function radcliffe_attachment_link_attributes( $link ) { $class = 'next_image_link' === current_filter() ? 'next' : 'prev'; return str_replace( '