fix page title
This commit is contained in:
parent
7db4f7b9bb
commit
d8810ab0f9
|
@ -197,10 +197,11 @@ function tainacan_active($selected, $current = true, $echo = true) {
|
|||
|
||||
}
|
||||
|
||||
add_filter('get_the_archive_title', function() {
|
||||
add_filter('get_the_archive_title', function($title) {
|
||||
if (is_post_type_archive('tainacan-collection')) {
|
||||
return __('Collections', 'tainacan-theme');
|
||||
}
|
||||
return $title;
|
||||
});
|
||||
|
||||
add_action('pre_get_posts', function($query) {
|
||||
|
|
|
@ -4,16 +4,20 @@
|
|||
<ul class="list-inline mb-1 d-flex">
|
||||
<li class="list-inline-item text-midnight-blue font-weight-bold title-page">
|
||||
<?php
|
||||
if(is_home()) _e('Posts of blog', 'tainacan-theme');
|
||||
if(is_home()) {
|
||||
if ( get_option( 'page_for_posts') ) {
|
||||
echo get_the_title( get_option('page_for_posts') );
|
||||
} else {
|
||||
_e('Blog Posts', 'tainacan-theme');
|
||||
}
|
||||
|
||||
}
|
||||
elseif(is_search()){
|
||||
_e('Search Results for', 'tainacan-theme');
|
||||
echo ' "' , get_search_query(), '"';
|
||||
}
|
||||
elseif(is_archive()){
|
||||
elseif(is_archive()) {
|
||||
echo ' ' . get_the_archive_title();
|
||||
if(is_author()) {
|
||||
_e('Posts of author', 'tainacan-theme');
|
||||
}
|
||||
}
|
||||
?>
|
||||
</li>
|
||||
|
|
Loading…
Reference in New Issue