codeex
says
Hello,
I have extra field in my post category and I want to display the subtitle in homepage but I can’t seem to fix it.. can you help me with this.. here’s my code:
$categories = get_categories();
foreach ($categories as $cats) {
$category_id = get_query_var('cat');
$category_data = get_option("category_$category_id");
<h5><?php echo $cats->name; ?></h5>
<?php echo "test" . $cats->$category_data['subtitle'];; ?>
}
did I miss something here…
thanks
WPScientist
says
Seems like the forum ate a bit of the code.
Try…
$category_data['subtitle']
...instead of…
$cats->$category_data['subtitle']
