-
Notifications
You must be signed in to change notification settings - Fork 218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Query Post Using Post Option Value Parameter #51
Comments
The framework saves all options in one meta key as serialized array, so you can't query by specific option id. If you want an option to be saved as separate meta, use the You can set this parameter to any option 'option_id' => array(
'type' => 'text',
'save-in-separate-meta' => true,
), The query for your case will be $args = array(
'post_type' => 'download',
'posts_per_page'=> 10,
'meta_query' => array(
array(
'key' => 'fw_option:feature_download',
'value' => '1',
),
),
'ignore_sticky_posts' => 1
);
$my_query = new wp_query($args); |
I have another question, what is the conditional tag for if this page using builder not the standard WP editor. Thanks. |
Hi @blackmekemeke, currently it is tricky to check whether a page is built with the builder or not, we will make a helper function that will do this in a future release. |
The |
I have custom post type named 'download' in my theme. I create checkbox option to set this post type as featured download, so when the checkbox checked the download post become featured download. I want to display latest featured download using this post option parameter. This is my wp query but it doesn't work.
Can you help me? thanks
The text was updated successfully, but these errors were encountered: