• Resolved wpfan1000

    (@wpfan1000)


    Hi,

    Correct me if I am wrong, but I see this plugin being able to be used in a similar fashion as custom field plugins.

    I can use wp_query to search for content in custom fields. And being able to search like this is a mandatory requirement for my sites.

    Can wp_query be used to search your plugin’s block fields?

    If not, is there another way to search?

    Thanks ahead of time…..

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Luke Carbis

    (@lukecarbis)

    Hi @wpfan1000 –?unfortunately not. To make things as lightweight and fast as possible, we store block field values in the post content. Since it’s not in meta, blocks load much faster, but can’t be filtered through wp_query.

    We do have a featured request to enable this, though, as an optional setting per block. We just haven’t gotten around to that yet.

    Thread Starter wpfan1000

    (@wpfan1000)

    Hi @lukecarbis,

    Thank you for getting back to me.

    With custom fields I can do a wp_query search say for:

    Field name = City, value = “Chicago”
    AND
    Field name = Size, value > 1000

    Am I correct in thinking that:

    If I have a paragraph block labeled City and a post has the value “Chicago” for this block, and I have another paragraph block labelled Size, and the post has a value of 2000, then all that information, ie the labels and values are stored in one row in the database?

    I believe this would make it hard to do an AND query like I could with custom fields…..

    Thread Starter wpfan1000

    (@wpfan1000)

    PS the feature of making each block a custom meta field is a great idea!! I add my vote to that ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Searching using wp_query?’ is closed to new replies.