-
AuthorPosts
-
October 27, 2014 at 12:23 pm #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!
October 28, 2014 at 10:57 am #342121Hi 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,
IsmaelNovember 4, 2014 at 10:02 am #345780Hi 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!
November 6, 2014 at 3:08 am #346930Hi!
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,
IsmaelNovember 6, 2014 at 10:24 am #347027Goodmorning,
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>'; }; }
November 6, 2014 at 10:25 am #347028This reply has been marked as private.November 7, 2014 at 11:48 am #347672Hi!
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,
IsmaelNovember 7, 2014 at 1:17 pm #347693Hi Ismael,
thank you so much!
Have a nice weekend,greetings ineke
-
AuthorPosts
- The topic ‘What template (loop) is used in tags.php’ is closed to new replies.