[Plugin: Custom Field Template] Query posts based on Template ID
-
I am using Custom Field Templates to create posts “types”; news, review or interview for example. I can identify the type of post by looking at the post Template ID.
I would like to be able to query the database to get the last 10 posts that use the Template ID of 2 for example.
As the information is stored in what I think is a serialised array within the custom_field_template_data meta field, I have realised that querying this data might not be possible. I hope I am wrong about that, and would be very thankful if someone could show me how I could be queried.
I assume its not as simple as: –
$postslist = get_posts('numberposts=20&order=DESC&orderby=post_date&meta_key=custom_field_template_data->posts&meta_value=2');
- The topic ‘[Plugin: Custom Field Template] Query posts based on Template ID’ is closed to new replies.