I normally have a header when going to the blog posts page from my main nav menu. However, once I am in the blog view and click on one of the categories in the my right sidebar, the header disappears. The same thing happens when I click on the archive month.
It is a bit dis-orienting that once you click on a category that there is no header or other indicator as to which category you have previously selected.
Is there a way to retain the header with the header label being the category that was selected?
FYI. I partially resolved the missing header issue because I noticed that archive.php was calling the following file:
<?php get_template_part(‘template_inc/page_header’); ?>
which does not exist in my directory structure.
I’ve temporarily changed the reference to the following instead:
<?php get_template_part(‘includes/view/page_header’); ?>
which gets rid of the missing header problem.
But I would like the header to reflect the selected category. Can you tell me if there is a way to do that?
OK. I made some more progress and have enabled the header to show the category name by adding the following code block to page_header.php:
$cat_obj = $wp_query->get_queried_object();
$title = __($cat_obj->name, ‘codeless’);
$title = $cat_obj->name;
I just have one more question…how can I achieve the same functionality for Archives. That is if I select a certain month-year combination to have that month-year combination displayed in the header.
2 years, 7 months ago MirelaKeymaster
Sorry for the late reply.
This type of customization is out of support scope. So i have forwarded your topic to our theme developers. We will get back to your shortly.
You must be logged in to reply to this topic.