This topic has 4 replies, 3 voices, and was last updated 10 years by catholicauthor.

  • Author
  • #15584
     mckown
    Participant

    Ok I managed to do it in the parent theme functions php .. my question is more of how do I accomplish this from the child theme functions .. I just need to change get_author_posts_url to bp_core_get_user_domain like this

    COPY CODE
    
    $author = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
    			esc_url( bp_core_get_user_domain( get_the_author_meta( 'ID' ) ) ),
    			esc_attr( sprintf( __( 'View all posts by %s', 'kleo_framework' ), get_the_author() ) ),
    			get_the_author()
    		);
    
    #15772
     Abe
    Keymaster

    Hi, Just copy the whole modified kleo_entry_meta function from kleo/functions.php to kleo-child/functions.php and it should override the default defined

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    ---
    @ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.

    #15834
     catholicauthor
    Participant

    Would love to implement this. Do you mind sharing the total modified code? 🙂

    #15837
     mckown
    Participant
    COPY CODE
    
    function kleo_entry_meta($echo=true, $att=array()) {
    	
    		$meta_list = array();
    		
    		// Translators: used between list items, there is a space after the comma.
    		$categories_list = get_the_category_list( __( ', ', 'kleo_framework' ) );
    
    		// Translators: used between list items, there is a space after the comma.
    		$tag_list = get_the_tag_list( '', __( ', ', 'kleo_framework' ) );
    
    		$date = sprintf( '<a href="%1$s" title="%2$s" rel="bookmark"><time class="entry-date" datetime="%3$s">%4$s</time></a>',
    			esc_url( get_permalink() ),
    			esc_attr( get_the_time() ),
    			esc_attr( get_the_date( 'c' ) ),
    			esc_html( get_the_date() )
    		);
    
    		$author = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
    			esc_url( bp_core_get_user_domain( get_the_author_meta( 'ID' ) ) ),
    			esc_attr( sprintf( __( 'View all posts by %s', 'kleo_framework' ), get_the_author() ) ),
    			get_the_author()
    		);
    
    		$meta_list[] = '<small class="meta-author">'.$author.'</small>';
    		$meta_list[] = '<small>'.$date.'</small>';
    		
    		$cat_tag = array();
    		
    		if ( $categories_list ) {
    			$cat_tag[] = $categories_list;
    		}
    		
    		if ($tag_list) {
    			$cat_tag[] = $tag_list;
    		}
    		if (!empty($cat_tag)) {
    			$meta_list[] = '<small class="meta-category">'.implode(", ",$cat_tag).'</small>';
    		}
    		
    		//comments
    		if (!isset($att['comments']) || (isset($att['comments']) && $att['comments'] !== false)) {
    		$meta_list[] = '<small class="meta-comment-count"><a href="'. get_permalink().'#comments">'.get_comments_number().' <i class="icon-chat-1 hover-tip" 
    			data-original-title="'.sprintf( _n( 'This article has one comment', 'This article has %1$s comments', get_comments_number(), 'kleo_framework' ),number_format_i18n( get_comments_number() ) ).'" 
    			data-toggle="tooltip" 
    			data-placement="top"></i></a></small>';
    		}
    		
    		if ($echo) {
    			echo implode(", ", $meta_list);
    		}
    		else {
    			return implode(", ", $meta_list);
    		}
    		
    	}
    
    #15840
     catholicauthor
    Participant

    Fantastic. Works great.

Viewing 5 posts - 1 through 5 (of 5 total)

The forum ‘KLEO’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?