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.

I want to start a funny images website but I have come across a dilemma. I want the website to display 1 post ( not the thumbnail) but the full post on the home page. (the most recent post). Similar to jokideo can anyone please direct me to a theme or provide some code that I need to edit in the wp theme files.

Thanks :)

share|improve this question
1  
You can do this using a page and set that page as a Homepage. Use a custom query for fetching the first post and use a loop to display the post content. –  Rohit Pande Mar 26 '13 at 6:57
add comment

1 Answer

I would recommend altering the loop that displays the home page posts. Something like

<?php /* Start the Loop */ 
        $i=0; 
        while ( have_posts() ) {

            the_post();

            if($i === 0){
                get_template_part( 'content', get_post_format() );
                break;
            }
            $i++;
        }
?>

There probably are better and more elegant solutions to this, but this is quite simple to implement.

You can edit the file responsible for displaying front page posts (index.php in the twentytwelve theme ), but I wouldn't recommend this seeing that it might be overwritten when updating. It will be better to use a custom theme, maybe a child theme, or to use a custom template file for the front page

share|improve this answer
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.