Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #108937
    catch-user
    Participant

    Hi,

    i’m interested in buying the premium version of the catchresponsive Theme. I studied the features list, but I can’t find this specific information: In the overview, the page WordPress uses to show a list of all the latest posts, I can only see the date and author of the post and the comments. I would like to show the category in addition to the mentioned 3 things.

    How do I customize the content of the <?php catch responsive entry meta(); ?> ? Is this part of the premium version, so I can easily customize the needed information? Or do I have to use functions.php etc. to customize this kind of information?

    For a better understanding:
    example

    #108974
    Pratik
    Participant

    Hi @catch-user,

    The feature you want is not available in pro theme either. However, you can achieve it in free theme or pro theme via same method, i.e. child theme customization.

    First, make a child theme for the current theme. For that, please follow instructions here: https://catchthemes.com/blog/create-child-theme-wordpress/.

    After that, let me know and I will guide you further to achieve what you want.

    Regards,
    Pratik

    #109007
    catch-user
    Participant

    Thanks for your fast response and help! I created a child theme as described in your link.

    #109009
    Pratik
    Participant

    Now, in your child theme’s functions.php file, add following code:

    
    /**
     * Prints HTML with meta information for the current post-date/time and author.
     *
     * @since Catch Responsive 1.0
     */
    function catchresponsive_entry_meta() {
    	echo '<p class="entry-meta">';
    
    	$time_string = '<time class="entry-date published updated" datetime="%1$s">%2$s</time>';
    
    	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
    		$time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time><time class="updated" datetime="%3$s">%4$s</time>';
    	}
    
    	$time_string = sprintf( $time_string,
    		esc_attr( get_the_date( 'c' ) ),
    		esc_html( get_the_date() ),
    		esc_attr( get_the_modified_date( 'c' ) ),
    		esc_html( get_the_modified_date() )
    	);
    
    	printf( '<span class="posted-on">%1$s<a href="%2$s" rel="bookmark">%3$s</a></span>',
    		sprintf( __( '<span class="screen-reader-text">Posted on</span>', 'catch-responsive-pro' ) ),
    		esc_url( get_permalink() ),
    		$time_string
    	);
    
    	if ( is_singular() || is_multi_author() ) {
    		printf( '<span class="byline"><span class="author vcard">%1$s<a class="url fn n" href="%2$s">%3$s</a></span></span>',
    			sprintf( __( '<span class="screen-reader-text">Author</span>', 'catch-responsive-pro' ) ),
    			esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),
    			esc_html( get_the_author() )
    		);
    	}
    
    	$categories_list = get_the_category_list( _x( ', ', 'Used between list items, there is a space after the comma.', 'catch-responsive-pro' ) );
    	if ( $categories_list && catchresponsive_categorized_blog() ) {
    		printf( '<span class="cat-links">%1$s%2$s</span>',
    			sprintf( _x( '<span class="screen-reader-text">Categories</span>', 'Used before category names.', 'catch-responsive-pro' ) ),
    			$categories_list
    		);
    	}
    
    	if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) {
    		echo '<span class="comments-link">';
    		comments_popup_link( esc_html__( 'Leave a comment', 'catch-responsive-pro' ), esc_html__( '1 Comment', 'catch-responsive-pro' ), esc_html__( '% Comments', 'catch-responsive-pro' ) );
    		echo '</span>';
    	}
    
    	edit_post_link( esc_html__( 'Edit', 'catch-responsive-pro' ), '<span class="edit-link">', '</span>' );
    
    	echo '</p><!-- .entry-meta -->';
    }
    

    This should have desired effect. Let me know how it goes.

    Regards,
    Pratik

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Pro-Version supports easy changes in entry meta?’ is closed to new replies.