I understand template tags, but I’m unfamiliar with THIS code…
-
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!
- The topic ‘I understand template tags, but I’m unfamiliar with THIS code…’ is closed to new replies.