Support » Fixing WordPress » While loop in Foreach Loop

  • Resolved AngelEyes

    (@clustervision)


    Im working a portfolio website and for some reason this PHP isn’t working for me.
    The site is basically a one pager, and I need to loop through each category within a custom post type (Portfolio) which is working, but my WP query that goes through each category isn’t working for some reason. Anyone have insight?

    thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • AngelEyes

    (@clustervision)

    Also, I should note that I did a print_r($the_query); and it returned all the stuff you would expect, so it seems to be specifically the while loop that isn’t working for some reason.

    Its also not an issue with my custom field, because I tried echoing out some random text inside the loop and that didnt work.

    AngelEyes

    (@clustervision)

    Figured it out. Had to add the post type to the query.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘While loop in Foreach Loop’ is closed to new replies.