• Hi this is probably a typical open and shut case, but I cant seem to figure out why my posts dont display titles. Any tips would be great, thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Type the code.

    Thread Starter safeandwetcom

    (@safeandwetcom)

    <?php get_header(); ?>
    <?php $options = get_option(‘pb_options’); ?>
    <div id=”middle-contents” class=”clearfix”>

    <div id=”left-col”>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <div class=”post”>
    <h2>“><?php the_title(); ?></h2>
    <ul class=”post-info”>

    • <?php the_time(__(‘F jS, Y’, ‘piano-black’)) ?>
    • <?php if ($options[‘author’]) : ?>

    • <?php _e(‘By ‘,’piano-black’); ?><?php the_author_posts_link(); ?>
    • <?php endif; ?>
      <li class=”write-comment”>#comments”><?php _e(‘Write comment’,’piano-black’); ?>
      <?php edit_post_link(__(‘[ EDIT ]’, ‘piano-black’), ‘<li class=”post-edit”>’, ” ); ?>

      <div class=”post-content”>
      <?php the_content(__(‘Read more’, ‘piano-black’)); ?>
      <?php wp_link_pages(); ?>
      </div>
      </div>
      <div class=”post-meta”>
      <ul class=”clearfix”>
      <?php if($options[‘post_meta_type’] == ‘category’) { ?>
      <li class=”post-category”><?php the_category(‘ . ‘); ?>
      <?php } else { ?>
      <?php the_tags(‘<li class=”post-tag”>’, ‘ . ‘, ”); ?>
      <?php } ?>
      <li class=”post-comment”><?php comments_popup_link(__(‘Write comment’, ‘piano-black’), __(‘1 comment’, ‘piano-black’), __(‘% comments’, ‘piano-black’)); ?>

      </div>

      <?php endwhile; ?>

      <?php if (function_exists(‘wp_pagenavi’)) { wp_pagenavi(); } else { include(‘navigation.php’); } ?>

      <?php _e(‘Return top’,’piano-black’); ?>

      <?php else: ?>
      <div class=”common-navi-wrapper”>
      <p><?php _e(“Sorry, but you are looking for something that isn’t here.”,”piano-black”); ?></p>
      </div>
      <?php endif; ?>

      </div><!– #left-col end –>

      <?php get_sidebar(); ?>

      </div><!– #middle-contents end –>

      <?php get_footer(); ?>

    Thread Starter safeandwetcom

    (@safeandwetcom)

    sorry about the lack of code box

    the title tag should be like this… <h2><?php the_title(); ?></h2>

    Use post_class() in the div tag. (On Line Line 6)

    Thread Starter safeandwetcom

    (@safeandwetcom)

    if I use post class in the div tag my post content is shifted to the left. thanks for the help btw maybe i should learn some php.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Missing post titles’ is closed to new replies.