Created
August 7, 2015 19:46
Revisions
-
salmanbd96 created this gist
Aug 7, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ Adding this code to your wordpress theme will dynamically create a title. <title><?php if (is_home()) { echo bloginfo('name'); } else if (is_404()) { echo '404 Not Found'; } else if (is_category()) { echo 'Category:'; wp_title(''); } else if (is_search()) { echo 'Search Results'; } else if ( is_day() || is_month() || is_year() ) { echo 'Archives:'; wp_title(''); } else { echo wp_title(''); } ?></title>