WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] While loop in Foreach Loop (3 posts)

  1. AngelEyes
    Member
    Posted 2 years ago #

    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!

  2. AngelEyes
    Member
    Posted 2 years ago #

    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.

  3. AngelEyes
    Member
    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Topic