Home > iNove > iNove theme: display categories list and tag list only if present

iNove theme: display categories list and tag list only if present

Last edited by on 13 December 2013 at 13:53

Change both index.php and single.php. Change from

[cce_php]            <?php if ($options['categories']) : ?><span><?php _e('Categories: ', 'inove'); ?></span><span><?php the_category(', '); ?></span><?php endif; ?>
            <?php if ($options['tags']) : ?><span><?php _e('Tags: ', 'inove'); ?></span><span><?php the_tags('', ', ', ''); ?></span><?php endif; ?>[/cce]

to

[cce_php]            <?php $categories_list = get_the_category_list( ', ', 'multiple' ); ?>
            <?php if (($options['categories']) && ($categories_list)) : ?>
                <span><?php _e('Categories: ', 'inove'); ?></span>
                <span><?php printf($categories_list); ?></span>
            <?php endif; ?>

            <?php $tag_list = get_the_tag_list( ', ', 'multiple' ); ?>
            <?php if (($options['tags']) && ($tag_list)) : ?>
                <span><?php _e('Tags: ', 'inove'); ?></span>
                <span><?php printf($tag_list); ?></span>
            <?php endif; ?>[/cce]

Then at the end of style.css add

[cce_css].post-categories li {
  list-style: none;
}[/cce]

Reference: Function Reference – get_the_category_list

 

 

 

Enoy 🙂

Categories: Wordpress, iNove
  1. No comments yet.
  1. No trackbacks yet.