WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Post Title Placement (10 posts)

  1. x9tripboarder16
    Member
    Posted 8 years ago #

    I feel really dumb asking this question because I'm sure it's probably an easy answer.

    I have created a customized website where I use wordpress on only one of the pages (I use the loop to get the posts). I want to create the layout so that the title floats on the left and the excerpt floats on the right. I have tried just placing the title and the excerpt on the same line, but for some reason there is a break (where the excerpt is below the title). Does anyone have any ideas?

    Thanks for the help!

  2. moshu
    Member
    Posted 8 years ago #

    If the title has any kind of "heading" around it (h2, h3 etc.) that always causes a line break.

  3. x9tripboarder16
    Member
    Posted 8 years ago #

    This is what I was using as the Loop:

    <div id="phppost">

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

    "><?php the_title(); ?> <?php the_excerpt() ?>

    <?php link_pages('Pages: ', '', 'number'); ?>

    <?php if (('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Both Comments and Pings are open ?>

    <?php } elseif (!('open' == $post-> comment_status) && ('open' == $post->ping_status)) {
    // Only Pings are Open ?>

    <?php } elseif (('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Comments are open, Pings are not ?>

    <?php } elseif (!('open' == $post-> comment_status) && !('open' == $post->ping_status)) {
    // Neither Comments, nor Pings are open ?>

    Posted on <?php the_time('F jS, Y') ?> by <?php the_author() ?> <?php } edit_post_link('','',''); ?>

    <?php endwhile; else: ?>
    <?php endif; ?>
    </div>

    Any ideas?

  4. x9tripboarder16
    Member
    Posted 8 years ago #

    The link was fine, there wasn't any wrong code.

  5. moshu
    Member
    Posted 8 years ago #

    Don't post code here - nobody reads it. Especially if you don't know how to post a short code snippet. (You should read the instructions below the text input area - why nobody ever reads it???)

    Did you check the source code of the output? I guess the excerpt will be displayed in between <p> tags - so that might cause the line break, too.

  6. x9tripboarder16
    Member
    Posted 8 years ago #

    Where would I find output code so I can alter it?

  7. moshu
    Member
    Posted 8 years ago #

    I didn't say you can alter the output. The "output" is what appears in your browser when you look at your site... and right click > view source -- would show what is the "output" of your code above.

  8. x9tripboarder16
    Member
    Posted 8 years ago #

    The output creates the tag, do you know how to prevent that from happening?

  9. moshu
    Member
    Posted 8 years ago #

    No. The tag creates the output :)

    I don't know, I never alter the core files.

  10. x9tripboarder16
    Member
    Posted 8 years ago #

    Thanks for the help!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags