WordPress.org

Forums

[resolved] Seperating Each Post with Border Images (4 posts)

  1. sead0g
    Member
    Posted 6 years ago #

    I'm currently using the theme called "Scrapbook": http://ericulous.com/2008/11/27/wp-theme-scrapbook/

    I wanted to add image borders (through use of table tags) around each individual post. However I can't figure out how to with this theme. I tried putting a table around various segments of php code in the index.php file, but just managed to make things look wonky. I was able to put images around the entire blog posts, but not individual posts.

    Any of you theme wizards out there able to help me figure out how to put image borders around each post?

    Thanks!

  2. sead0g
    Member
    Posted 6 years ago #

    Bumpity bump.

    If I was unclear, I'd like to seperate each post like this (for example): http://spacekicker.com/

    As opposed to this: http://sead0g.com/blog/

    Still hope someone out there can help!

  3. sead0g
    Member
    Posted 6 years ago #

    Figured it out through much hair pulling. Began the table tags right after

    { echo 'class="post"'; } ?> id="post-<?php the_ID(); ?>">

    and ended the table tags right before:

    <?php endwhile; ?>

    Hope that helps someone else.

  4. esmi
    Forum Moderator
    Posted 6 years ago #

    Sorry but I don't think using table markup is the right way to go. Tables should be for displaying data - not for layout or presentation. A better way to go, in my opinion, would be to use the 'post' and 'page' classes that WordPress automatically inserts via:

    post_class()

    If you wanted a box-effect, you'd also need to insert two additional divs that open just after:

    <div <?php post_class();?>>

    and close just before:

    </div>
    <?php endwhile; ?>

    You can apply a top image via the post/pages class, a middle image using the first div and a bottom image via the second div. Voila - bordered posts and no table markup.

    I've used a very similar approach for the comments in the same theme.

Topic Closed

This topic has been closed to new replies.

About this Topic