the content – How do I remove the title from the_content


I have this code that I use to get the posts that are in a certain category. The problem is the function the_content() returns the title of the page at the top of the rest of the content. Is there a way to filter the title out. I am not sure how to use filters and I am not sure that is what I am supposed to be using for this?

$args = array(
  'post_type' => 'post',
  'suppress_filters' => true,
  'orderby' => 'menu_order', 
  'posts_per_page' => 30,                
  'tax_query' => array(
    'taxonomy' => 'category',
    'field'    => 'slug',
    'terms'    => array( 'services' ),
$additional_loop = new WP_Query($args); 
while ($additional_loop->have_posts()) : $additional_loop->the_post();
<article id="post-<?php the_ID(); ?>" class="post_article">
  <div class="col-xs-12  no_pad">
      <h3><?php echo the_title();?></h3>
    <?php the_content(); ?>
</article><!-- #post-## -->

Just to be clear, the code above will out put something like:

This is my title

This is my title
This is the rest of the content for the post. bla bla bla

PeggyMe 3 months 2021-07-17T22:14:05-05:00 0 Answers 0 views 0

Leave an answer