WordPress.org

Ready to get started?Download WordPress

Forums

Simple Fields
simple_fields_query_posts - multiple num_in_set option (2 posts)

  1. jakecool
    Member
    Posted 1 year ago #

    Hi there,
    thank you for this great plugin!
    I currently have set up a repeatable field in a custom post type. Say the field name is video.
    What I would like to do is simply query posts that have a particular video(id) as field and use the results (post title) as the title of the page. So that when i request a Video (post type), the code will look for the posts that have the requested video as a field.
    This is what happens:
    If the post has only one video, when I execute "simple_fields_query_posts", I get the expected results. On the other hand, if the post has more than one video, what happens is that the resulting query is empty (no results) since the "sf_num_in_set" argument (which i don't set) is setted to 1 by default.

    I'm not able to retrieve that parameter before sending the query, is there something I am missing?

    thank you

    http://wordpress.org/extend/plugins/simple-fields/

  2. Pär Thernström
    Member
    Plugin Author

    Posted 1 year ago #

    Could you give me some example of the code you are using?

    Perhaps getting the meta keys and then using http://codex.wordpress.org/Class_Reference/WP_Query#Custom_Field_Parameters
    directly is they way to go here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic