Daniel
Forum Replies Created
Viewing 7 replies - 1 through 7 (of 7 total)
-
Forum: Plugins
In reply to: [ICIT Weather Widget] Day/Night doesn't workMy mistake, forget it.
Forum: Plugins
In reply to: [ICIT Weather Widget] Error in country/cityThis section need be translatable
//Map weather id to the weather condition to displayForum: Themes and Templates
In reply to: Styling images by categoriesSuggestions? Ideas? uh?
Forum: Themes and Templates
In reply to: Styling images by categoriesThis piece of code works to me… is possible transform it in a function?
<?php $cat = get_the_category($post->post_parent); $catid = $cat[0]->cat_ID; //$catid = get_the_category( single_cat_title() ); $parents = explode('|',get_category_parents($catid, FALSE, '|','nicename')); $cat_class = $parents[0]; ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class($cat_class);?>>Forum: Themes and Templates
In reply to: Styling images by categoriesGive me this error: syntax error, unexpected ‘;’
And y I chango to $catid = get_cat_ID( single_cat_title());
This other: Catchable fatal error: Object of class WP_Error could not be converted to string
Forum: Themes and Templates
In reply to: Styling images by categoriesesmi, your function return the default category not the post parent category. 🙁
Forum: Themes and Templates
In reply to: Styling images by categoriesThis work but now I need convert in function…
$cat = get_the_category($post->post_parent);
$myCat = $cat[0]->cat_ID;
if ($myCat == 001) {
$style = ‘category-001’;
}
elseif ($myCat == 002) {
$style = ‘category-002’;
}
echo $style;Ideas, uh? 🙂
Viewing 7 replies - 1 through 7 (of 7 total)