• Resolved mypatraining

    (@mypatraining)


    I’m interested in displaying an image right AFTER my first post (before the second). The image is a link to vote for my site, but my hope is to get visitors reading something before they’re hit up for a vote.

    The voting banner link won’t fit in a sidebar widget, and it will soon disappear if I make it a post. Is this doable? If so, the easier, the better.

    Here’s the blog: https://66.147.244.210/~mypatrai/blog/
    the light blue image at the top is what I would like to put after the first post.

    Thanks!
    PK

Viewing 6 replies - 1 through 6 (of 6 total)
  • Nalin

    (@nalin_duminda)

    Hi mypatraining,

    I’m not that clear.

    Do you want to show Vote Image right after you first post instead show it as big banner (way you have right now)?

    will you be able to post a screenshot?

    Thread Starter mypatraining

    (@mypatraining)

    Right now I have it as a post, but what I really want is to have it stay in a position right after my most recent post.

    For example:

    Post from 12/31/10
    Banner image with link
    Post from 12/29/10 (excerpt)

    Then after another new post,

    Post from 1/2/2011
    Banner image with link
    Post from 12/31/10 (excerpt)
    Post from 12/29/10 (excerpt)

    This way, the banner add stays in the same place (second from the top) and the posts move downward “around” it.

    Visual approximation: https://66.147.244.210/~mypatrai/blog/

    Nalin

    (@nalin_duminda)

    okay i think i understood you requirement. send me your post loop (PHP code) then its more easier me to do the required amendments.

    Hi mypatraining,

    Go to home.php
    And add the highlighted lines
    <?php $is_first=true;?>
    <?php static $show_banner = 1; ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>


    <?php edit_post_link(‘Edit this entry.’, ‘<span>’, ‘</span>’); ?>
    </p>
    </div>
    <?php if ($show_banner == 1){ $show_banner = 0; ?>
    banner goes here.

    <?php } ?>
    <?php $is_first=false;} else { ?>

    Thread Starter mypatraining

    (@mypatraining)

    Wow, that’s pretty and easy to do. Thanks. I’ll give it a try.

    Thread Starter mypatraining

    (@mypatraining)

    Like a charm. Thanks a load!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can I display a static image on the front page between posts?’ is closed to new replies.