No space between “Category:” label and category

Home Forums WordPress Themes – Premium Pure & Simple No space between “Category:” label and category

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #17171
    Donna Green
    Participant

    Hi

    Please can someone tell me which file to edit to amend the metadata text on a single blog post? The bit just under the blog post title which says “Published on” etc?

    There is white space missing between “Category:” and the actual name of the category that is really bugging me!

    I would like to edit the single post .php file but I’m not sure which file it is.

    Thank you
    Donna

    #22620
    Sushil Adhikari
    Moderator

    Hi Donna Green,

    Add this code on child theme functions.php file:

    function puresimple_posted_on() {
    	$time_string = '%2$s';
    	if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
    		$time_string .= '%4$s';
    	}
    
    	$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() )
    	);
    
    	$posted_on = sprintf(
    		_x( 'Published on: %s', 'post date', 'puresimple' ),
    		'' . $time_string . ''
    	);
    
    	$byline = sprintf(
    		_x( 'by %s', 'post author', 'puresimple' ),
    		'' . esc_html( get_the_author() ) . ''
    	);
    
    	echo '' . $posted_on . '';
    //show category on blog page
    	if(get_theme_mod('hide_category_on_blog_page') !== '' && is_home()){echo '&nbsp'.'';}
    //show category on single post
    	if(get_theme_mod('hide_category_on_single_post') !== '' && is_single()){echo '&nbsp'.'';}
    	if ( ! post_password_required() && ( comments_open() || '0' != get_comments_number() ) ) { 
            echo '';
                echo '';
                    _e( ' ', 'puresimple' );
                    comments_popup_link( __( 'Comment', 'puresimple' ), __( '1 Comment', 'puresimple' ), __( '% Comments', 'puresimple' ) ); 
                }
            echo '';
      
    }

    Note: Please proceed this steps only if you are technically sound on WordPress otherwise you will be in trouble.

    Thanks

    #22632
    Donna Green
    Participant

    Thank you, this works perfectly 😀

    #17172
    Sushil Adhikari
    Moderator

    That’s great Donna , happy for you. 🙂

    Thanks

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