WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In pages-news.php

<div class="thirteen columns"><?php 
if ( has_post_thumbnail() ) {
  the_post_thumbnail();}  ?>
  <div class="title-blog">
    <h2><a href="<?php the_permalink() ?>"> <?php the_title(); ?> </a></h2>
if( in_array( $post->ID, array() )) {
  echo get_the_content();
} else {
  echo get_excerpt();

In single-page-news.php

<div class="thirteen columns">
  <div class="title-single"><h2><?php the_title(); ?></h2> </div>
  <?php the_content();?>

The pages-news.php is what I want but the single-page-news.php is wrong. For the single page of article, at first I want the_post_thumbnail, after that the title of article, and then the content. How can I do that?

share|improve this question
Move code from former to latter?.. – Rarst May 18 '13 at 20:01
The result is the same. <?php the_content();?> has the_post_thumbnail. – MikeD May 18 '13 at 20:07
what theme is that? the_content() does normally not show the featured image. – Michael May 18 '13 at 20:13

This seems too simple. I am afraid that I have badly misunderstood something. Apologies if that is the case.

Alter single-page-news.php to be...

<div class="thirteen columns"><?php
  the_post_thumbnail(); ?>
  <div class="title-single">
    <h2><?php the_title(); ?></h2>
  the_content(); ?>
share|improve this answer
I do that. For this i have : post_thumbnail->title -> post_thubnail-> text – MikeD May 18 '13 at 20:10
The the_post_thumbnail only shows up once in that code. Do you have a filter on the_content that might be duplicating it? Comment out the the_content() line and see what happens. – s_ha_dum May 18 '13 at 20:13
No i don't have any filter. When i comment out the the_content() show only the title and post_thubnails – MikeD May 18 '13 at 20:25
Here you seem to say that the_content does not print the post thumbnail but above you say that the_content prints the post thumbnail, which is not normal and means you probably do have a filter. It is very, very, very hard to work out what you mean. Do you mean thumbnails with at 's'-- more than one? – s_ha_dum May 18 '13 at 21:44
I thought it was something like that. – s_ha_dum May 18 '13 at 21:46

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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