Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #341440

    Goodmorning,

    I would like to add some meta info to the posts in in the tags overviewpage, but I can’t find the source from where these post are loading, it sure is not from the loop-index.php or loop-archive.php? So the page is using tags.php and then? Thanks already for your help!

    #342121

    Hi InekeWerkt!

    Thank you for using Enfold.

    If the blog style is set to grid layout, for post, you can edit config-templatebuilder > avia-shortcodes > postslider.php. If you’re looking to edit the portfolio items, look for the portfolio.php file. If the grid layout is not selected, you can edit includes > loop-index.php.

    Best regards,
    Ismael

    #345780

    Hi Ismael, thanks for your reply.
    But now I have one more question, the last one! ;-)
    I want to show in what issue nr(=categorie) the post is shown. I tried the best I could but I can’t get the right cat to show up.
    This is what I did:

     if($show_meta && !empty($excerpt))
    					{
    						$output .= "<div class='slide-meta'>";
    
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    
    							$output .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div>";
    						}
                            $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
    						$category = get_the_category(); 
    
                        if(!empty($category))
                        {
                           $output .= '<span class="blog-categories minor-meta">Published '.__('in','avia_framework')." ";
                           $output .= '<a href="' . get_category_link( $category[0]->term_id ) . '">' . $category[0]->cat_name . '</a>';			$output .='</span>';	
                        };
    						//$output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    						$output .= "</div>";
    
    					}

    but in this way only a “random cat” is shown. Could you help me out?

    Thanks!

    #346930

    Hi!

    Thank you for the update.

    You kinda lost me on this part, “I want to show in what issue nr(=categorie) the post is shown”. Can you please elaborate? The code you provided should show the first category name in the array.

    Best regards,
    Ismael

    #347027

    Goodmorning,

    yes, I thought (hoped ;-)) it would show it too, but every post shows the same categorie. -> example: http://dash-journal.com/tag/amsterdam/

    It works well in the loop-index.php, but not in postslider.php. I had to change the code a bit, but obviously I did something wrong….

    So in the loop-index.php the code is:

     $category = get_the_category(); 
    
                        if(!empty($category))
                        {
                            echo '<span class="blog-categories minor-meta">Published '.__('in','avia_framework')." ";
                            echo '<a href="' . get_category_link( $category[0]->term_id ) . '">' . $category[0]->cat_name . '</a>';					echo '</span>';	
                            //echo '</span><span class="text-sep text-sep-cat">/</span>';
                        }

    in the postslider.php:

    $category = get_the_category(); 
    
                        if(!empty($category))
                        {
                           $output .= '<span class="blog-categories minor-meta">Published '.__('in','avia_framework')." ";
                           $output .= '<a href="' . get_category_link( $category[0]->term_id ) . '">' . $category[0]->cat_name . '</a>';			$output .='</span>';	
                        };
    						
    
    					}
    #347028
    This reply has been marked as private.
    #347672

    Hi!

    Please replace the code with this:

    $category = get_the_category($the_id); 
    
                        if(!empty($category))
                        {
                           $output .= '<span class="blog-categories minor-meta">Published '.__('in','avia_framework')." ";
                           $output .= '<a href="' . get_category_link( $category[0]->term_id ) . '">' . $category[0]->cat_name . '</a>';			$output .='</span><div class="slide-meta-del">/</div>';	
                        };

    Make sure that to create a log of these changes. They will be overwritten when you update the theme.

    Regards,
    Ismael

    #347693

    Hi Ismael,
    thank you so much!
    Have a nice weekend,

    greetings ineke

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘What template (loop) is used in tags.php’ is closed to new replies.