• Resolved sgchauhan

    (@sgchauhan)


    is it possible to have the post title & post content in one line? e.g. title : content

    i have tried editing the index.php and the stylesheet (entry) but with no luck.

    thanks in advance.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Yes, it’s totally possible. Put the title and author tag on one line :

    <?php the_title(); ?> <?php the_author(); ?

    Make sure you don’t have these codes wrap in different header tags (<h1>, <h2>, etc.).

    Your best bet would be to fit them in the same div or the same header.

    Something like :

    <h2><?php the_title(); ?>&nbsp;<?php the_author(); ?</h2>

    You can give a class to to h2 to style it as you want :

    <h2 class="title_and_author"><?php the_title(); ?>&nbsp;<?php the_author(); ?</h2>

    S.

    Thread Starter sgchauhan

    (@sgchauhan)

    Thread Starter sgchauhan

    (@sgchauhan)

    this is what i am using

    <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a> : <class="entry"><?php the_content('Read the rest of this entry &raquo;'); ?>

    i tried to do what you said but it still didnt work. any other thoughts?

    Thread Starter sgchauhan

    (@sgchauhan)

    figured it out.

    changed <?php the_content('Read the rest of this entry &raquo;'); ?>

    to <?php echo get_the_content(); ?>

    I believe the_content() automatically wraps the post content in <p> tags and that’s why you couldn’t get it to work. But I’m not sure.

    Oh, sorry! I misreaded you! I readed “the title” and “the author”…

    Sorry.

    S.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘post title & post content in one line’ is closed to new replies.