For loop that outputs from a particular category to a webpage
-
I’ve been busting my head trying to figure this out. But either the information is lacking online or the ones found just don’t work. So I hope you can help.
Basically, I have used magic fields to create a write panel and fields. I can enter these values. They end up being inserted into the wp_postmeta table in the database. I also place them in a category. (The one displayed on the right hand side on the screen, where you can add more categories).
I want the text, content and image fields (magic fields) of the post of that category (Lets call it courses).
I need a for loop probably, that queries (using sql) the database and returns these info. So if I had added, 4 courses to the database with an image, I would have 4 items (post_title, shortened content, image) displayed on the webpage.
I would click one these box like items as you might have guessed, and have the full info displayed on the page.
So how do I retrieve these magic fields data that belong to a particular category? And yes, I have tried using these:
get ($fieldName, $groupIndex=1, $fieldIndex=1, $readyForEIP=true,$post_id=NULL)…
get_image()…
wp_query…none worked.
Thanks
- The topic ‘For loop that outputs from a particular category to a webpage’ is closed to new replies.