Support » Fixing WordPress » Recent Post display

  • I made a search and still couldn’t solve my problem.

    I got this error msg on my theme:

    Warning: Invalid argument supplied for foreach() in /home/catscity/domains/ on line 43

    and the line 43 code shows this:

    <h3 class=”sec-title”>Recent articles</h3>
    $posts = get_posts(‘numberposts=5&offset=1’);
    foreach($posts as $post) :

    why it doesn’t work?
    I am using the latest wordpress and a theme called brajeshwar.

Viewing 1 replies (of 1 total)
  • That error, on a foreach statement, likely means your $posts variable is empty.

    How many actual posts do you have?

Viewing 1 replies (of 1 total)
  • The topic ‘Recent Post display’ is closed to new replies.