Ok, I’m Stumped
-
I have the following code in two themes:
<?php
foreach ($recentposts as $post) {
if ($post->post_title == '')
$post->post_title = sprintf(__('Post #%s'), $post->ID);
echo "<li><a href='?p=$post->ID'>";
the_title();
echo '</a></li>';
}
?>It works in one theme, but in the other, I get this error:
Warning: Invalid argument supplied for foreach() in /home/myusername/public_html/wp-content/themes/minim8/sidebar.php on line 18
The code is exactly the same for both. Whassup wif dat? Help appreciated and may result in good karma for you.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Ok, I’m Stumped’ is closed to new replies.