I’ve searched through other support tickets and can’t quite find the right answer for this…
We would like to use the Choices Latest News widget in the footer twice – once for one category and once for another. When you click on any post now, the heading on the page is Blog – Latest News.
I understand how to change that in the single.php file, but we really would like it to display the category name. For example, Latest Post: Good Links and Articles (that being the category name).
And then for the other category, Latest Post: Catherine’s Blog
Any help is most appreciated!
Here is the site:
In single.php replace:
$title = __('Blog - Latest News', 'avia_framework'); //default blog title
$cats = get_the_category();
$title = $cats->cat_name;
and the post category will be used as title.
I did this and it sort of worked…. But what is showing is the word Array instead of the category name!
Any idea why?
Sorry – that post was removed without my knowing!
Whoops – the return value is an array in this case – I adjusted the code above.
The topic ‘Latest News widget’ is closed to new replies.