Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

im editing my posts and when i create one, it comes:

TITLE

IMG

CONTENT

and i want it like this:

IMG

TITLE

CONTENT

------------------got it---------------------------

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

<?php $pclass = ($wp_query->current_post === 1)  ? 'middle-post-class' : 'first-last-class' ; ?>
<div id="post-style" <?php post_class($pclass); ?> >

<h1 class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>

<?php the_content(); ?>

</div>

--------------------end----------------------------

is the any way i can do it? thanks.

share|improve this question
    
Edit the file single.php. –  Christine Cooper Feb 22 '13 at 15:54
    
What Theme are you using? Please post relevant Theme template code. –  Chip Bennett Feb 22 '13 at 15:58
add comment

1 Answer

You can't use the post content to add an image outside of the call to the_content().

If you want to look into implementing Post Thumbnails (i.e. Featured Images) into your Theme.

Full implementation is outside the scope of a simple question-and-answer; however, in the end, your markup will change from this:

<h1 class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>

<?php the_content(); ?>

...to something like this:

<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>

<h1 class="title"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>

<?php the_content(); ?>
share|improve this answer
    
thank you done :) –  Andrew28 Feb 22 '13 at 17:07
add comment

Your Answer

 
discard

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.