With the get_header()
function, if I have an header.php
and an header-news.php
, can I use the second file only when a single post of the nesw category is displayed? I have a one page wordpress website where the only page will be the news category archive and the sigle news categorized posts that are using the single.php
file template. The menu links are anchor tags so if the user navigate away from home by clicking on a news, I need that the menu can redirect it back to the home where all the contents are published. Also I need some suggestion on how to paginate my category archive. Thanks in advance.
With the get_header()
function, if I have an header.php
and an header-news.php
, can I use the second file only when a single post of the nesw category is displayed? I have a one page wordpress website where the only page will be the news category archive and the sigle news categorized posts that are using the single.php
file template. The menu links are anchor tags so if the user navigate away from home by clicking on a news, I need that the menu can redirect it back to the home where all the contents are published. Also I need some suggestion on how to paginate my category archive. Thanks in advance.
1 Answer
Reset to default 0Please try this header in single.php
<?php get_header('news'); ?>
let me know if still facing the issue.