Tagged: 

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #213019

    Hi,
    I would like to display category and tags under title post.

    Is it possible?

    Thanks,
    Pietro

    #213068

    Hi 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,
    Ismael

    #213215
    This reply has been marked as private.
    #213755

    Hi!

    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,
    Peter

    #213760

    Parse 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

    #213842

    Hey!

    I edited Dude’s code a bit, please try it again.

    Best regards,
    Ismael

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Category display’ is closed to new replies.