Tagged: category
Viewing 6 posts - 1 through 6 (of 6 total)
-
AuthorPosts
-
January 21, 2014 at 10:58 pm #213019
Hi,
I would like to display category and tags under title post.Is it possible?
Thanks,
PietroJanuary 22, 2014 at 12:36 am #213068Hi studiotopo!
Edit loop-index.php, find this code on line 188 then remove it:
if(has_tag() && is_single() && !post_password_required()) { echo '<span class="blog-tags minor-meta">'; the_tags('<strong>'.__('Tags:','avia_framework').'</strong><span> '); echo '</span></span>'; }
Look for this code on line 153:
if(!empty($cats)) { echo '<span class="blog-categories minor-meta">'.__('in','avia_framework')." "; echo $cats; echo '</span><span class="text-sep text-sep-cat">/</span>'; }
Below, add this code:
if(has_tag() && is_single() && !post_password_required()) { echo '<span class="blog-tags minor-meta">'; the_tags('<strong>'.__('Tags:','avia_framework').'</strong><span> '); echo '</span></span>'; echo '</span><span class="text-sep text-sep-cat">/</span>'; }
Regards,
IsmaelJanuary 22, 2014 at 10:14 am #213215This reply has been marked as private.January 23, 2014 at 10:20 am #213755Hi!
Open up wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/postslider.php and replace
$output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
with
$output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>"; $taxonomies = get_object_taxonomies(get_post_type($the_id)); $cats = ''; $excluded_taxonomies = apply_filters('avf_exclude_taxonomies', array('post_tag','post_format'), get_post_type($the_id), $the_id); if(!empty($taxonomies)) { foreach($taxonomies as $taxonomy) { if(!in_array($taxonomy, $excluded_taxonomies)) { $cats .= get_the_term_list($the_id, $taxonomy, '', ', ','').' '; } } } if(!empty($cats)) { $output .= '<div class="slide-meta-cats">'.__('in','avia_framework')." "; $output .= $cats; $output .= '</div><div class="slide-meta-del">/</div>'; } $tags = get_the_tags(); $tag_links = ''; foreach ($tags as $tag) { $tag_links = '<a href="'.get_tag_link($tag->term_id).'">'.$tag->name.'</a>, '; } if(!empty($tag_links)) { $output .= '<div class="slide-meta-tags">'; $output .= $tag_links; $output .= '</div><div class="slide-meta-del">/</div>'; }
Best regards,
PeterJanuary 23, 2014 at 10:32 am #213760Parse error: syntax error, unexpected ‘slide’ (T_STRING) in /home/studiotopo/public_html/wordpress/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes/postslider.php on line 388
January 23, 2014 at 2:18 pm #213842 -
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
- The topic ‘Category display’ is closed to new replies.