• Resolved volleybum

    (@volleybum)


    This is the code for my index page, which can be found at https://eric-carlson.net It’s a photoblog. Please scroll down for my question/concern:

    <?php get_header(); ?>
    <!-- begin post -->
    <?php if (! empty($display_stats) ) { get_stats(1); echo ""; } else if (($posts & empty($display_stats)) ) : foreach ($posts as $post) : start_wp(); ?> <div class="entry">

    <?php global $post, $tableposts;
    $previous = @$wpdb->get_var("SELECT ID FROM $tableposts WHERE post_date < '$post->post_date' AND post_status = 'publish' ORDER BY post_date DESC LIMIT 0, 1");
    if ($previous) {
    $link = get_permalink($previous);
    echo '<a href="' . $link . '" title="Previous">' . $post->post_content . '</a>
    ';
    } else {
    the_content('[More Photos]');
    } ?>

    </div>

    <div class="posted"><strong>ʘ <?php the_ID(); ?></strong> // <a>" title="Permalink"><?php the_time('M j, 'y') ?></a> / <?php the_category(', '); ?> / <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>
    <?php previous_post('%', 'Previous', 'no'); ?> <?php next_post('%', '/ Next', 'no'); ?> / <a href="/?page_id=11" title="archive">thumbnails</a> <?php edit_post_link('/ edit','<span class="editlink">','</span>'); ?>

    </div>

    <!-- <?php trackback_rdf(); ?> -->

    <?php endforeach; else: ?>
    <b> <h2 class="center">Sorry! Apparently this page doesn't exist.</h2> </b>

    <?php endif; ?>

    <!-- end post -->

    </div>

    <?php get_footer(); ?>

    On the index page beneath the image/content (i.e. the most recent post), wordpress displays the post ID, date, category, comments, and the thumbnails link. This code is located within <div class=”posted”>. There is also code for navigation in there (i.e. “previous” and “next”), but it doesn’t display on the index page for some reason. On other pages for previous posts, however, the navigation code is displayed, but the comments code isn’t. My goal is to have all of the code within <div class=”posted”> display regardless of what page/post (there is only one posted image per page) is currently being called up, index or otherwise. I’m fairly certain this whole phenomenon is governed by the code directly above <div class=”posted”>: the code that begins with <?php global $post, $tableposts;…..etc. The problem is, I have no idea how to alter this code (or what the heck it means, for that matter) to achieve my goal. Any help would be greatly appreciated. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter volleybum

    (@volleybum)

    Oh, and I forgot to post which theme I’m using. It’s Simple T. Taly is the author. You can find it if you google it. Thanks again.

    My goal is to have all of the code within <div class=”posted”> display regardless of what page/post (there is only one posted image per page) is currently being called up, index or otherwise.

    Have a single.php?
    https://www.boren.nu/archives/2004/11/10/anatomy-of-a-wordpress-theme/

    Thread Starter volleybum

    (@volleybum)

    No, I don’t have a single.php file. I think I can guess what you’re getting at, but the problem is that the template’s author is using some specialized code to govern what displays and what doesn’t. I wouldn’t know what code to throw into a single.php in order to obtain my goal. Does it seem like my assumption is correct about that strange code above <div class=”posted”>?

    Thread Starter volleybum

    (@volleybum)

    Forgot something again. This template uses the “custom posts per page” plugin. Not sure if that helps or not. Cheers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I understand template tags, but I’m unfamiliar with THIS code…’ is closed to new replies.