Comma between tags and categories

Hello,

I would like to know how to remove the commas appearing between the Tags and the Categories.

Thank you.

Hi @dimeliandco,

I hope you are well today and thank you for your question.

You can remove the commas appearing between the Tags and the Categories on single post page by adding the following code in the functions.php file of your child theme.

if ( ! function_exists( 'travelify_theloop_for_single' ) ) :
/**
 * Fuction to show the single post content.
 */
function travelify_theloop_for_single() {
	global $post;

	if( have_posts() ) {
		while( have_posts() ) {
			the_post();

			do_action( 'travelify_before_post' );
?>
	<section id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
		<article>

			<?php do_action( 'travelify_before_post_header' ); ?>

			<header class="entry-header">
    			<h2 class="entry-title">
    				<?php the_title(); ?>
    			</h2><!-- .entry-title -->
  		</header>

  		<?php do_action( 'travelify_after_post_header' ); ?>

  		<?php do_action( 'travelify_before_post_meta' ); ?>

  			<div class="entry-meta-bar clearfix">
    			<div class="entry-meta">
	    				<span class="author"><a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>"><?php the_author(); ?></a></span>
	    				<span class="date"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( get_the_time() ); ?>"><?php the_time( get_option( 'date_format' ) ); ?></a></span>
	    				<?php if( has_category() ) { ?>
	             		<span class="category"><?php the_category(' '); ?></span>
	             	<?php } ?>
	    				<?php if ( comments_open() ) { ?>
	             		<span class="comments"><?php comments_popup_link( __( 'No Comments', 'travelify' ), __( '1 Comment', 'travelify' ), __( '% Comments', 'travelify' ), '', __( 'Comments Off', 'travelify' ) ); ?></span>
	             	<?php } ?>
    			</div><!-- .entry-meta -->
    		</div>

				<?php do_action( 'travelify_after_post_meta' ); ?>

				<?php do_action( 'travelify_before_post_content' ); ?>

  			<div class="entry-content clearfix">
    			<?php the_content();
    			if( is_single() ) {
						$tag_list = get_the_tag_list( '', __( ' ', 'travelify' ) );

						if( !empty( $tag_list ) ) {
							?>
							<div class="tags">
								<?php echo $tag_list; ?>
							</div>
							<?php
						}
					}

               wp_link_pages( array(
						'before'            => '<div style="clear: both;"></div><div class="pagination clearfix">'.__( 'Pages:', 'travelify' ),
						'after'             => '</div>',
						'link_before'       => '<span>',
						'link_after'        => '</span>',
						'pagelink'          => '%',
						'echo'              => 1
               ) );
               ?>
  			</div>

  			<?php

  			do_action( 'travelify_after_post_content' );

  			do_action( 'travelify_before_comments_template' );

         comments_template();

         do_action ( 'travelify_after_comments_template' );

         ?>

		</article>
	</section>
<?php
			do_action( 'travelify_after_post' );

		}
	}
	else {
		?>
		<h1 class="entry-title"><?php _e( 'No Posts Found.', 'travelify' ); ?></h1>
      <?php
   }
}
endif;

Best Regards,
Vinod Dalvi