
-
AuthorPosts
-
March 1, 2015 at 6:57 pm #404144
Hello,
I need exactly what was asked in this previous topic: https://kriesi.at/support/topic/change-meta-on-grid-blog-posts/
The solution for “II -. BLOG POSTS” worked without any problems.
But when I try to make the changes for “I – GRID Layout” two problems occurred.
1) It also shows “0 Contribute” instead of just “Contribute”. So I tried Ismael´s solution, but it didn´t worked. How can I get rid of the “0”?
2) The author name always links to the same (mostly wrong) author of my multi-author blog. Maybe the .php snippet just links to one main author? How can I make it to link always the right author archive of my multi-author blog?It would be great, if someone could solve these problems.
-
This topic was modified 10 years, 4 months ago by
DustinH93.
March 3, 2015 at 8:28 am #404989Hey DustinH93!
Thank you for using Enfold.
1.) Please look for this code:
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>"; }
Replace it with:
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" ? __('Contribute', 'avia_framework' ) : __('Contribute', 'avia_framework' ); $commentCount = $commentCount !== "0" ? $commentCount : ''; $output .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a></div><div class='slide-meta-del'>/</div>"; }
Again, look for this line of code:
$commentCount = get_comments_number($the_id);
Replace it with:
$commentCount = $entry->comment_count;
2.) Can you please provide a link to the issue? We would like to check it.
Best regards,
Ismael -
This topic was modified 10 years, 4 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.