Hello,
I am using the snippet below to display the blog and tag archive pages in “blog-grid” layout
The tag archive pages have a too general “POSTS” title. Please see screenshot in Private Content
<h3 class=”post-title tag-page-post-type-title “>Posts</h3>
I would like that the title is the tag itself.
Can be done?
Thank you
Mauro
/* https://kriesi.at/support/topic/how-to-customize-layout-of-archive-pages/
https://kriesi.at/support/topic/how-to-make-changes-in-for-example-the-archive-php-file-with-a-child-theme/#post-1210426 #####*/
add_filter(‘avf_blog_style’,’avia_change_category_blog_layout’, 10, 2);
function avia_change_category_blog_layout($layout, $context){
if($context == ‘archive’) $layout = ‘blog-grid’;
return $layout;
}
add_filter(‘avf_blog_style’,’avia_change_tag_blog_layout’, 10, 2);
function avia_change_tag_blog_layout($layout, $context){
if($context == ‘tag’) $layout = ‘blog-grid’;
return $layout;
}
/* https://kriesi.at/support/topic/how-to-customize-layout-of-archive-pages/
https://kriesi.at/support/topic/how-to-make-changes-in-for-example-the-archive-php-file-with-a-child-theme/#post-1210426 FINE #####*/
Hey profumopuntoit,
Thank you for the inquiry.
Did you edit the tag.php file directly to add the title? You should be able to use the get_the_archive_title or the the_archive_title functions to render the actual title of the tag or category page.
// https://developer.wordpress.org/reference/functions/get_the_archive_title/
// https://developer.wordpress.org/reference/functions/the_archive_title/
Or just enable the title in the Enfold > Header > Header Layout > Header Title and Breadcrumbs settings.
Best regards,
Ismael