Support » Themes and Templates » the_content is not showing

Viewing 2 replies - 1 through 2 (of 2 total)
  • You do realize your doing a loop within a loop right?

    <?php while(have_posts()) : the_post(); ?> <– thats your loop.

    now your doing:

    foreach($myposts as $post) <– another loop.

    Get rid of the 2nd foreach and put:
    $myposts = get_posts(‘numberposts=-1&offset=$debut&category=4’);

    above the while (have_posts())

    and give that a try.

    Thread Starter wolfkin

    (@wolfkin)

    alright I tried to do that and some tweeking to fix “unexpected ;” errors I end up with this code
    http://wordpress.pastebin.com/m1c062919

    which doesn’t show any posts.

    line 14 seems to be my problem. I thought since it was in the same PHP statement I should change the ; to a : but then I kept getting unexpected : errors on line 15. So i deleted it and that gave me an error. So I put in the original ; and that gives me no errors but also no posts.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘the_content is not showing’ is closed to new replies.