Last active
June 6, 2017 09:49
-
-
Save allysonsouza/572ebf20a356b063473a to your computer and use it in GitHub Desktop.
Revisions
-
allysonsouza revised this gist
Jun 16, 2014 . 1 changed file with 5 additions and 1 deletion.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 @@ -1,3 +1,5 @@ <?php function archive_title() { //Conditionals to Title Display in WordPress Archive Templates @@ -19,4 +21,6 @@ function archive_title() { return 'Archives'; } } ?> -
allysonsouza revised this gist
Jun 16, 2014 . 1 changed file with 1 addition and 1 deletion.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 @@ -16,7 +16,7 @@ function archive_title() { } //Fallback if there's no archive matching the conditions return 'Archives'; } } -
allysonsouza revised this gist
Jun 16, 2014 . 1 changed file with 18 additions and 18 deletions.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 @@ -1,22 +1,22 @@ function archive_title() { //Conditionals to Title Display in WordPress Archive Templates if( is_archive() ) { $queried_object = get_queried_object(); if( is_tag() ) { $slug = $queried_object ? $queried_object->slug : ' ' ; return ucfirst( $queried_object->name ); } else if( is_tax() ){ $slug = $queried_object ? $queried_object->slug : ' ' ; return ucfirst( $queried_object->name ); } else { $slug = $queried_object ? $queried_object->rewrite['slug'] : ' ' ; return $queried_object->labels->name; } //Fallback if there's no archive matching the conditions return __('Archives', 'odin'); } } -
allysonsouza revised this gist
Jun 16, 2014 . 1 changed file with 1 addition and 2 deletions.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 @@ -16,8 +16,7 @@ } //Fallback if there's no archive matching the conditions return 'Archives'; } } -
allysonsouza renamed this gist
Jun 16, 2014 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
allysonsouza created this gist
Jun 16, 2014 .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,23 @@ //Conditionals to Title Display in WordPress Archive Templates if( is_archive() ) { $queried_object = get_queried_object(); if( is_tag() ) { $slug = $queried_object ? $queried_object->slug : ' ' ; } else if( is_tax() ){ $slug = $queried_object ? $queried_object->slug : ' ' ; } else { $slug = $queried_object ? $queried_object->rewrite['slug'] : ' ' ; } if( $slug ) { return ucfirst($slug); } //Fallback if there's no archive matching the conditions echo '<img src="'. latitude_imgs().'/default.jpg" />'; return; } }