I want to make categories have different templates if the have a certain word in their slug. For example, all categories with the word "computers" will have one template. All categories with the word "videos" will have another template. So, the structure will go something like this:
if (category slug has word videos)
// use this template
elseif (category slug has word computers)
// use this template
I found this code to get the category slug (haven't tested it)
<?php if(is_category()) {
$cat = get_query_var('cat');
$yourcat = get_category($cat);
$cat_slug = $yourcat->slug;
?>
but then I don't have enough php knowledge to see if a word is in that category slug. Please help. Thank You.