I'm having a weird issue where Wordpress is cutting off and not grabbing all of the content from pages or posts.

Examples can be seen on the following pages:



Here is what the code looks like for single.php

<?php get_template_part('parts/header'); the_post(); ?>


  <div class="singleContainer">

    <article id="post-<?php the_ID(); ?>"
             <?php post_class(); ?>
             itemscope itemtype="http://schema.org/BlogPosting">

        <h1 class="singleHeadline" itemprop="headline">
          <?php the_title(); ?>

        <div class="singleInfo">Posted by <a class="authorLink linkFade"><?php the_author();?></a> on <?php echo get_the_date( get_option('date_format'));?> </div>

      <div class="singleBody" itemprop="articleBody">
        <?php the_content(); ?>



  <div class="discussion">

      <div class="centerBox">
        Have comments or questions about this article? Feel free to discuss below with other members.

      <div class="comments">

        <?php comments_template(); ?>




<?php get_template_part('parts/footer'); ?>

And here is what the code looks like for page.php, which is doing the same thing.

<?php get_template_part('parts/header'); the_post(); ?>


  <section class="container">

    <div class="title">
      <h1><?php the_title(); ?></h1>

    <div class="content">
      <?php the_content(); ?>



<?php get_template_part('parts/footer'); ?>

Any ideas what the issue might be? I'm using Scratch theme.

This isn't my first time using my theme, but is my first time getting this error. I've spoken with my friend who developed the theme, but we were both able to decide that Scratch wasn't the issue that this was happening.

Any suggestions?


Try calling the_post() at the top of the file before calling functions like the_title() and the_content()

If that doesn't work, then most likely you have a function on the the_content filter that is causing this problem. Try disabling the plugins you have installed one by one to see if that fixes the problem

  • I've done that. It's at the top of each of my code snippets that I provided, right next to the header. I've also disabled plugins and tried from there, still nothing. I'll try looking and seeing if there is a filter somewhere that got created by mistake, but I don't believe that's the case. – Quinton Chester Jan 5 '17 at 15:51
  • Just ran through my functions.php and there was a filter there. Now I feel silly, but thanks for making me check myself. – Quinton Chester Jan 5 '17 at 16:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.