I have a site with 5 different categories, each of them with a notices
section.
I would like also to have another section to see the latest notices from any category.
So far, I figured out that I can just use this in the URL ?cat=20,25,30,35
and it will return exactly what I want (if I'm not mistaken).
Now, I would like to know how could I create another template page for that particular section containing all the notices.
Usually I do something like this in my category.php
:
if($this_category->slug == "groups-london" || $this_category->slug == "groups-cambridge"){
include(TEMPLATEPATH.'/groups.php');
}else{
include(TEMPLATEPATH.'/general.php');
}
BUt in this case I can not use the same approach because I noticed the $this_category
only contains the information from the category passed as the first parameter in the URL.
So, in this case ?cat=20,25,30,35
only from category with ID 20
.
Any recommendation? Maybe I should just use a completely different approach to solve this issue?
$this_category
? How is that set? – s_ha_dum May 26 '15 at 4:25$this_category = get_category($cat);
– Alvaro May 31 '15 at 15:16