• How can I remove the tags from my posts so the summary is more about the content of the article? Trying out free version before purchasing. Thanks!

Viewing 1 replies (of 1 total)
  • Hi @2bkaribbean

    1. For this you need to create child theme.Reference here for child theme
    2. Now in functions.php in child theme’s folder add the following code:

    <?php
    add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
    function theme_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }
    function colormag_entry_meta() {
       if ( 'post' == get_post_type() ) :
       	echo '<div class="below-entry-meta">';
       	?>
    
          <?php
          $time_string = '<time class="entry-date published" datetime="%1$s">%2$s</time>';
          if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) {
             $time_string .= '<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"><a href="%1$s" title="%2$s" rel="bookmark"><i class="fa fa-calendar-o"></i> %3$s</a></span>', 'colormag' ),
       		esc_url( get_permalink() ),
       		esc_attr( get_the_time() ),
       		$time_string
       	); ?>
    
          <span class="byline"><span class="author vcard"><i class="fa fa-user"></i><a class="url fn n" href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>" title="<?php echo get_the_author(); ?>"><?php echo esc_html( get_the_author() ); ?></a></span></span>
    
          <?php
          if ( ! post_password_required() && comments_open() ) { ?>
             <span class="comments"><?php comments_popup_link( __( '<i class="fa fa-comment"></i> 0 Comment', 'colormag' ), __( '<i class="fa fa-comment"></i> 1 Comment', 'colormag' ), __( '<i class="fa fa-comments"></i> % Comments', 'colormag' ) ); ?></span>
          <?php }
    
       	edit_post_link( __( 'Edit', 'colormag' ), '<span class="edit-link"><i class="fa fa-edit"></i>', '</span>' );
    
       	echo '</div>';
       endif;
    }

    3. Now activate the child theme and the tags should be removed as you wished.
    Note: Please customize files of child theme, so your changes will not overwrite on theme update.

    Thank You!!

Viewing 1 replies (of 1 total)
  • The topic ‘Remove tags from posts’ is closed to new replies.