Query and present data from a pod based on one field's value?
-
I’m currently building a new WP site as a request from a friend who’s making ‘let’s play’ videos on YouTube. He wants a ‘game database’ that allows him to easely add & link new games by filling a form. And for that reason I’ve choosen Pods as the plugin of choice. However, it’s the first time I’m using WP for anything outside of it’s ordinary functions.
So first I’ve created a Custom Content Type pod called ‘game’, and added all the fields I require.
Next, I enabled Templates and created a new template that’ll display all pod fields from ‘game’ in a desired page layout. Works nice!
Now I only need to create pages listing the content created with the pod ‘game’ based on certain criteria. I have a Relationship Field called ‘platforms’ containing a multiple choice list of game systems, and would like to use this field’s values for sorting.
I basically need, for example, a page listing links to all ‘game’ posts that have their ‘platforms’ value set to ‘PS3’. Listing them using titles and clickable image links out of their respective pod items. I’ve tried something like this:
[pods name="game" limit="50" where="t.platforms = 'PS3'"]<a href="./game/{@slug}" alt="Geen link gevonden" title="{@title}"><img src="{@boxart}" alt="{@title}"></a>[/pods]
But all it does is generate a mySQL error for the ‘where’ tag. Everything I tried to enter in the where box results in a mySQL error.
I’m sorry if this all seemed vague, I’m not much of a troubleshooter. But what is the easiest method for querying data out of a Pod and presenting it on a page?
Thanks in advance!
- The topic ‘Query and present data from a pod based on one field's value?’ is closed to new replies.