csbaff
Forum Replies Created
-
Forum: Plugins
In reply to: List last 5 posts of a certain category? Help, please!Thanks otto for all your help.. I put in the call right before the main loop like this:
query_posts();
<?php if (have_posts()) : while (have_posts()) : the_post(); ?><div class=”post” id=”post-<?php the_ID(); ?>”>
<h3 class=”storytitle”>” rel=”bookmark”><?php the_title(); ?></h3>
<div class=”expiration”>
<?php if (has_expiration_date()): ?>
<?php if (has_expired()): ?>
<br/><b><font color=”blue”>This offer has expired</font></b>
<?php else: ?><?php endif; ?>
<?php endif; ?>
</div>and I still get this error:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AND comment_approved = ‘1” at line 1]
SELECT COUNT(comment_ID) FROM blog_wp_comments WHERE comment_post_ID = AND comment_approved = ‘1’;Forum: Plugins
In reply to: List last 5 posts of a certain category? Help, please!-
<?php
- “><?php the_title(); ?> — <?php the_excerpt(); ?>
$posts = get_posts(‘numberposts=10&category=76’);
foreach($posts as $post) :
?><?php endforeach; ?>
<br><br>
I tried add the example.. It listed the 10 posts, but I got errors in the for all the other posts on the page in the general loop. see below:
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘AND comment_approved = ‘1” at line 1]
SELECT COUNT(comment_ID) FROM blog_wp_comments WHERE comment_post_ID = AND comment_approved = ‘1’;Forum: Plugins
In reply to: List last 5 posts of a certain category? Help, please!I added this loop to my homepage to show the last 10 posts of a particular category at the top of my homepage, and left in the regular home page post loop to show all the posts.
Now my pagination has disappeared from the bottom.. Any clues?
Forum: Fixing WordPress
In reply to: Changing Timestamp while preserving permalinksHere’s an older post permalink before the timestamp change:
https://www.myblog.com/2006/01/thepost/
after I edit the post, i repost it using the timestamp edit feature. Now here is the new permalink
https://www.myblog.com/2006/05/thepost/
The problem is partly an SEO issue to, if a search engine indexed that old post permalink, they’ll get a page not found when they get there.
Forum: Fixing WordPress
In reply to: Changing Timestamp while preserving permalinksThanks for the link, but I’ve already imported my posts to WP. My problem is that I can’t preserve an old permalink when the timestamp is changed.
Forum: Fixing WordPress
In reply to: My Mod Rewrite isn’t workingMoved it up to the top, still doesn’t work.