Support » Fixing WordPress » "Commenting" Inserted into Post Excerpt For Some Reason

  • Hi, I am building a custom theme and have something funny going on with my posts page (index.php). For some reason the word “Commenting” is being inserted at the end of all the excerpts on my posts page. The template is a simple excerpt call the_excerpt(); and nothing more. This doesn’t happen if I change to “the_content”. I looked in my functions file and I don’t see anything that would cause this. Also, this only occurs when there is no written excerpt and it displays part of the content as the excerpt. Any idea what is causing this? I’ve never seen this before.

    This is what is output as the excerpt
    <p>This is an excerpt. Commenting</p>

    My functions file that specifies the excerpt length.

    // Changes excerpt length
    function new_excerpt_length($length)
    	return 35;
    add_filter('excerpt_length', 'new_excerpt_length');
    // Puts link in excerpts more tag
    function new_excerpt_more($more)
        global $post;
    	return '<a>ID) . '"> </a>';
    add_filter('excerpt_more', 'new_excerpt_more');
Viewing 1 replies (of 1 total)
  • Aaand after spending all morning on this, I’ve concluded that I’m an idiot. Commenting is part of the content and is just being cut off by the excerpt length. Yikes, I really wish we could delete our own threads.

Viewing 1 replies (of 1 total)
  • The topic ‘"Commenting" Inserted into Post Excerpt For Some Reason’ is closed to new replies.