[Plugin: Category Meta plugin] Php help
-
I’m totally stuck with the php here, but I hope I’m being pretty clear with what I need and someone will kindly help me!
I’m using the following category loop to create a schedule for a radio station:
<div id="showcatheaders"><img src="<?php bloginfo('template_url'); ?>/images/lunchtime_show_title.png" /></div> <div id="lunchtimeshows"> <?php $args=array( 'orderby' => 'name', 'order' => 'ASC' ); $categories=get_categories('child_of=6'); foreach($categories as $category) { echo ' <div class="showboxtitle" style="background:url('. $category->description . ') no-repeat;"> <a href="' . get_category_link( $category->term_id ) . '" class="nct" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>' . $category->name.'</a> </div>'; } ?>
I’m calling up the category description for a background at the moment, but I would like to change that to a category meta called ‘catimg’.
I also need to display a day & time meta called ‘timeandday’ one line break after the category name within the div class named ‘showboxtitle’.
I’m totally stuck on how to modify the
if (function_exists('get_terms_meta')) { $metaValue = get_terms_meta($category_id, $meta_key); }
template into this category loop, so please, please help!
- The topic ‘[Plugin: Category Meta plugin] Php help’ is closed to new replies.