mingya
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Problem of comments not matching post IDFound the culprit to this inconsistency. It’s the loop within loop inside single.php that caused this problem, but still don’t know what went wrong. Please help.
The loops were written as follow:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div <?php post_class(); ?> id=”post-<?php the_ID(); ?>”>
<h2>” rel=”bookmark” title=”<?php printf(__(‘Permanent Link to %s’), the_title_attribute(‘echo=0’)); ?>”><?php the_title(); ?></h2>
<div class=”entry”>
<?php the_content(__(‘Read the rest of this entry »’)); ?>
<?php wp_link_pages(array(‘before’ => ‘<p>‘ . __(‘Pages:’) . ‘ ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
<?php the_tags( ‘<p class=”tags”>’ . __(‘Tags:’) . ‘ ‘, ‘, ‘, ‘</p>’); ?>
</div>
<?php
$tags = wp_get_post_tags($post->ID);
if ($tags) {
echo ‘Related Posts’;
$first_tag = $tags[0]->term_id;
$args=array(
‘tag__in’ => array($first_tag),
‘post__not_in’ => array($post->ID),
‘showposts’=>5,
‘caller_get_posts’=>1
);
$my_query = new WP_Query($args);
if( $my_query->have_posts() ) {
while ($my_query->have_posts()) : $my_query->the_post(); ?>
<p>” rel=”bookmark” title=”Permanent Link to <?php the_title_attribute(); ?>”><?php the_title(); ?></p>
<?php
endwhile;
}
}
?>
<?php comments_template(”, true); ?>
<?php endwhile; else: ?>
<h2 class=”center”><?php _e(‘Sorry, no posts matched your criteria.’, ‘ctn1’); ?></h2>
<?php include (TEMPLATEPATH . “/searchform.php”); ?>>
<?php endif; ?>
</div>Forum: Fixing WordPress
In reply to: Problem of comments not matching post IDI did a database repair, originally found a duplicate on the comment index, then I export the db, port it to a new set of wordpress setup. There I notice the post_ID is matching the comment_post_ID, but wp_list_comments retrieve the comments with a different post_ID.
Unfortunately I cannot produce a public site immediately, however, if you may help explain how wp_list_comments retrieve it’s data, isn’t based on the comment_post_ID key on the single.php of a default theme?
Forum: Fixing WordPress
In reply to: Problem of comments not matching post IDSite is intranet. Any other way besides a public site?
Forum: Fixing WordPress
In reply to: How to enable email activation on registration?Basically I’d like to see an email sent from wordpress to newly registered user, a link of some sort, so they can click to activate the account, or else it will either expire at a certain period or best if simply they are not allowed in backend till then.
Forum: Fixing WordPress
In reply to: How to remove Gears completely from Tools?3.0 it is. I’ll wait. Thank you.