• How do you add a line in the single.php file? I would like to add a line between my post and the author? How do you get code php to add a line?

    <?php get_header(); ?>

    <!– start sidebar one –>
    <div id=”sidebar1″ class=”sidebar”>

      <?php /* Widgetized sidebar, if you have the plugin installed. */
      if ( function_exists(‘dynamic_sidebar’) && dynamic_sidebar(2)) : else : ?>
    • <h2><?php _e(‘Recent Posts’); ?></h2>
      <?php get_archives(‘postbypost’, ’10’, ‘custom’, ‘

    • ‘, ‘
    • ‘); ?>

    <?php endif; ?>

    </div>
    <!– end sidebar one –>

    <div id=”content” class=”widecolumn”>

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

    <div class=”post” id=”post-<?php the_ID(); ?>”>
    <h1 class=”title”>” rel=”bookmark” title=”Permanent Link: <?php the_title_attribute(); ?>”><?php

    the_title(); ?></h1>

    <div class=”entry”>
    <?php the_content(‘<p class=”serif”>Read the rest of this entry »</p>’); ?>

    <?php wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
    <?php the_tags( ‘<p>Tags: ‘, ‘, ‘, ‘</p>’); ?></div></div>

    <?php the_author(); ?>

    <?php comments_template(); ?>

    <?php endwhile; else: ?>

    <p>Sorry, no posts matched your criteria.</p>

    <?php endif; ?>

    </div>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • I would very carefully use the editor function in the theme section of your dashboard, the files are listed to the right, select and edit.

    However you must backup your files first

    Putting a <? or missing a ] can completely mess up your pages!

    Thread Starter pacheco377

    (@pacheco377)

    Thanks, but I still need to know how to add a line between my post and the author. I tried
    , but it does not work.

    Thread Starter pacheco377

    (@pacheco377)

    Sorry, I tried the break command < br > but it does not work

    Thread Starter pacheco377

    (@pacheco377)

    Actually, I just figured it out. Thanks for your advice just the same!

    Sorry I assumed you meant how to add a line of code, not how to add a line of html ‘space’ – if you see what I mean. Glad you sorted it out.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Adding a line in php’ is closed to new replies.