1

I try to display a featured image below the blog-post title. actually my posts look like:

WP-header
post-title
date | author | comments
post content
tag | category 

My goal is to get a full-sized-image (featured image) between post-title & date | author | comments Actually I am using a Corpo Theme.

Any ideas?
Best Regards

CTSchmidt
  • 1,155
  • 3
  • 17
  • 30

1 Answers1

4

You can fetch featured image using following code and paste it after post-title which should be <?php the_title() ?>

<?php 
 if ( has_post_thumbnail()) {
   $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
   echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
   the_post_thumbnail('thumbnail');
   echo '</a>';
 }
 ?>

Since i haven't seen your full code so i can help you up-to this.

See Codex Tutorial

Monirul Islam
  • 985
  • 1
  • 8
  • 23
  • but one more little thing: I want the image at full width - similar to a slider. What do I have to change? – CTSchmidt Feb 11 '14 at 14:16
  • If you want to get your full width image then use $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'full'); instead of $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); – Monirul Islam Feb 12 '14 at 01:34