Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #394143

    Hello there, first of all I must say it’s a great theme and I am enjoying making site with it.
    For my site its really important to show the author name. So, I want to show only the Author Name in Blog archive page in blog grid mode, not the date and comments count. How Can I do it? Thanks in advance.

    #394216

    Any suggestion guys? I have searched the support forum but haven’t found any solution regarding display only the author name below the post title in blog archive in blog-grid mode.

    #394279

    Hey!

    Thank you for using our theme.

    You have to modify the core file enfold\config-templatebuilder\avia-shortcodes\postslider.php.

    Goto line 375 you find:

    
                       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));
    						$output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    						$output .= "</div>";
    					}
    

    Replace with:

    
     if($show_meta && !empty($excerpt))
    					{
    						$output .= "<div class='slide-meta'>";
    						
    						$author_id = $entry->post_author;
    						$author_name = get_the_author_meta('display_name', $author_id);
    						$author_link = get_the_author_meta('user_url', $author_id);
    						$output .= "<div class='slide-meta-comments'><a href='{$author_link}'>{$author_name}</a></div>";
    //						$output .= "<div class='slide-meta-del'>/</div>";
    						
    //						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));
    //						$output .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    						$output .= "</div>";
    					}
    

    Cheers!
    Günter

    #394483

    Thanks a lot Günter, that works perfectly. Does this mean if I want to show the time in some of the blog post on different category blog archive it’s not possible anymore? There is a plugin “Custom Single Post Templates Manager” with that its possible to give some code on each of the category archive from archive.php. If it’s possible to do from archive.php then I can create a new_archive.php and assign it for a specific category.

    • This reply was modified 9 years, 10 months ago by Anderson C.
    #394503

    Hey!

    Thank you for coming back.

    The code above should affect only pages that use elements from the layout builder, not the standard pages.

    But to be sure try to setup a testpage and check it.

    Regards,
    Günter

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.