Thread Starter
opaz59
(@opaz59)
sorry wrong category – i blame the mouse roller
Thread Starter
opaz59
(@opaz59)
nah – it doesnt like that. the whole code segment is:
<?php
}
if ( $recentposts = $wpdb->get_results(“SELECT ID, post_title, post_content FROM $wpdb->posts WHERE post_status = ‘publish’ AND post_date_gmt < ‘$today’ ORDER BY post_date DESC LIMIT 5”) )
{
?>
<div style=”float:right;width:33%;”>
<h3><?php _e(‘Recent Posts’); echo ” »“; ?></h3>
<?php
foreach ($recentposts as $post)
{
if ($post->post_title == ”)
$post->post_title = sprintf(__(‘Post #%s’), $post->ID);
echo ”
- ID’>”;
the_title();
echo ‘
‘.substr(strip_tags($post->post_content),0,150).’ […]
‘;
}
?>
Try posting your code here:
http://paste.uni.cc/
Thread Starter
opaz59
(@opaz59)
good plan. i’ve done as you suggest. cheers
π then post back with the URI you got after pasting it to the paste.uni.cc
Thread Starter
opaz59
(@opaz59)
ah see what you mean lol.
http://paste.uni.cc/8312
Well, same here, and my suggestion works. I change:
echo "<li><p><a href='post.php?action=edit&post=$post->ID'>";
to:
echo "<li><p><a href='/?p=$post->ID'>";
This also works:
echo "<li><p><a href='/index.php?p=$post->ID'>";
Just make sure the url is correct for your blog. This more complicated version should avoid any problems:
echo "<li><a href='" . get_bloginfo('home') . "/index.php?p=$post->ID'>";
Thread Starter
opaz59
(@opaz59)
I used the first one and it seems to work perfectly. I thank you.