Skip to content

Instantly share code, notes, and snippets.

@Nurik985
Forked from marcosfreitas/wp-title.php
Last active August 21, 2020 11:03
Show Gist options
  • Save Nurik985/d69bc334210085d94349265c9c9ff70c to your computer and use it in GitHub Desktop.
Save Nurik985/d69bc334210085d94349265c9c9ff70c to your computer and use it in GitHub Desktop.

Revisions

  1. Nurik985 renamed this gist Aug 21, 2020. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @marcosfreitas marcosfreitas created this gist Jul 10, 2017.
    14 changes: 14 additions & 0 deletions wp-title.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    <title>
    <?php

    if(is_home()):
    bloginfo('name');
    elseif( is_category() || is_tag() ):
    single_cat_title(); echo ' &bull; '; bloginfo('name');
    elseif( is_single() || is_page() ):
    single_post_title();
    else:
    wp_title( '|', true, 'right' );
    endif;
    ?>
    </title>