Custumizing meta-data (adding category) under posts on homepage
-
Hi, I`m working with a theme called Inspire by Boostdevelopers (http://themeforest.net/item/inspire-a-multipurpose-masonry-theme/4023580) and I spend hours over a small function I would like to add. On the homepage (3 column layout) underneath the posts I wan’t to show the category in the meta-data. I tried to take the code from the single-post meta data, because on the single-post page it does show the category. But whatever I tried it didn’t work.
In single.php the code is like this:
<!-- TITLE AND META --> <div class="post-title"> <h1><?php the_title(); ?></h1> <span class="heart<?php if (mb_is_value_in_delim_string($like_string,get_the_ID(),",")) echo " liked"; ?>"><?php echo $likes; ?></span> <span class="meta"><?php _e('Posted by', 'loc_inspire'); ?> <?php the_author_posts_link(); ?> - <?php echo mb_localize_datetime(get_the_time(get_option('date_format'))); ?> - <?php the_category(', ') ?></span> </div>
In functions_ajax_posts_columns_display.php the code is:
<?php //META if ($result_cmb_comp_meta == "checked") { $likes = get_post_meta($results_query[$i]->ID, 'inspire_likes', true); if (empty($likes)) $likes = 0; ?> <div class="meta"> <span class="heart<?php if (mb_is_value_in_delim_string($like_string,$results_query[$i]->ID,",")) echo " liked"; ?>"><?php echo $likes; ?></span> <span class="date"><?php echo mb_localize_datetime(format_datetime_str(get_option('date_format'), $results_query[$i]->post_date));?></span> </div>
I`m guessing I need to add a new function to functions_custom.php but thats where my knowledge ends. The website is currently running offline using wampserver so unfortunately I can’t link to anything, maybe somewhere next week. I hope it makes sense to someone who’s familiar with this theme or problem. Any help would be much appreciated!
- The topic ‘Custumizing meta-data (adding category) under posts on homepage’ is closed to new replies.