[resolved] Database queries from within the loop (3 posts)

  1. joemastro
    Posted 2 years ago #

    Howdy all.

    I'm working on learning wp_query, but have run into a problem.

    I want to get most of the meta values for a post, regardless of their value. From what I have been reading, the suggestion is to use get_post_meta() from within the loop.

    I'm kind of a hack, but I do remember it being repeated that you don't run a query while looping through a query.... get_post_meta is a query, and the loop processes a query.

    What the heck am I missing?


  2. Andrew Bartel
    Posted 2 years ago #

    Oh it's fine don't worry. What you're reading about is running a "query" that would create a secondary loop while you're already in a loop.

  3. joemastro
    Posted 2 years ago #

    Ah.. Thank you! Sorry for the late response.... trying to figure out the Walker.

Topic Closed

This topic has been closed to new replies.

About this Topic