Support » Themes and Templates » Theme with just image on home?

Theme with just image on home?

  • I’ve looked everywhere and haven’t been able to find or tweak a theme to just have a static image on the homepage.

    I just want to:

    1. Post blog post with an image
    2. Have that show up on homepage
    3. User can click that image to get to the previous post
    4. The image will be left justified in the browser

    Any ideas?

Viewing 11 replies - 1 through 11 (of 11 total)
  • esmi


    Forum Moderator

    You should be able to do this by tweaking just about any theme and using the post thumbnail and possibly add_image_size if you want a large image on the front page.

    Thanks esmi – I just downloaded the bones theme and am tweaking that – do you know how I can link the image (post) so it always goes to the previous one?



    Forum Moderator

    Sorry _ I may have misunderstood you initially (the brain is not working at 100%). You want one post on the front (main posts) page and then a image navigation links that leads to the previous post, yes?

    How many post will be on subsequent pages?
    Will you also want an image link for someone to move forward to the next post when they are on page 2 or 3 etc?

    no problem I appreciate the help.

    I just need the image to be the post. That shows on the homepage. When a user click that photo they are taken to the previous post.

    So somehow I just need to image to link to the previous post in the PHP (which I’m a total hack)



    Forum Moderator

    Something like:

    $prev_post = get_previous_post();
    if (!empty( $prev_post )): ?>
    <a href="<?php echo get_permalink( $prev_post->ID ); ?>"><?php the_post_thumbnail(); ?></a>
    <?php endif;

    within the Loop might work.

    I’m almost there – take a look here http://formfold.com – it’s showing as a title of the blog post.

    I also can’t figure out how to get rid of the sidebar on the bones theme? huh.



    Forum Moderator

    Try removing the eightcol class off the div#main.

    I’m still having issues with this – anyone have ideas – here is the php code:

    <div id="main">
    					    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    						<?php $prev_post = get_previous_post(); if (!empty( $prev_post )): ?>
     						 <a href="<?php echo get_permalink( $prev_post->ID ); ?>"><?php echo $prev_post->post_title; ?></a>
    					    <article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article">
    						    <section class="entry-content clearfix">
    							    <?php the_content(); ?>
    						    </section> <!-- end article section -->
    						    <?php endif; ?>
    						    <footer class="article-footer">
        							<p class="tags"><?php the_tags('<span class="tags-title">Tags:</span> ', ', ', ''); ?></p>
    						    </footer> <!-- end article footer -->
    						    <?php // comments_template(); // uncomment if you want to use them ?>
    					    </article> <!-- end article -->

    there is an endif somewhere in the middle of article, and no endwhile and endif of the loop (?)

    please use the pastebin to paste the full code of the template – http://codex.wordpress.org/Forum_Welcome#Posting_Code

    you also might need to adjust the css to center and/or stretch the image…

    sorry about that – here is the code from my index.php


    ya I’ll need to fix the css def and will mess with that once I figure out this php stuff 🙂

    this is where I would add the ‘endif’:


Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Theme with just image on home?’ is closed to new replies.
Skip to toolbar