Getting saved metabox values.
Thank you for this awesome framework.However I am unable to get the meta values.How can I get the meta value of this?
'demo_addable_option_2' => array(
'label' => __('Addable Option', 'fw'),
'type' => 'addable-option',
'option' => array(
'type' => 'text',
),
'value' => array('Option 1', 'Option 2', 'Option 3'),
'desc' => __('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fw'),
'help' => sprintf("%s \n\n'\"<br/><br/>\n\n <b>%s</b>",
__('Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.', 'fw'),
__('Sed ut perspiciatis, unde omnis iste natus error sit voluptatem accusantium doloremque laudantium', 'fw')
)
),
fw_get_db_settings_option('demo_addable_option_2')if the option is used inframework-customizations/theme/options/settings.phpfw_get_db_post_option($post_id, 'demo_addable_option_2')if the option is used inframework-customizations/theme/options/posts/{post-type}.phpfw_get_db_term_option($term_id, $taxonomy, 'demo_addable_option_2')if the option is used inframework-customizations/theme/options/taxonomies/{taxonomy}.php
Thank you.I tried to show the value but this returned nothing.Can you please point my mistake?
Sorry, I made a mistake.
The fw_get_db_post_option() first parameter is the post id then the option id. (I updated the comment above)
You can find those functions in docs
sorry fixed it.Thanks again for this framework
echo implode(', ', fw_get_db_post_option($postid, 'demo_addable_popup_2', array()));
Is fw_get_db_post_option() used for blog posts or can I use it to return all options in page-builder?
When I print fw_get_db_post_option(0) it returns all options for the page_id and shows 'btn_color' inside the json array.
If I print fw_get_db_post_option(0, 'btn_color') it returns null.
If not how can I get the page-builder options like $atts in shortcode view?
return all options in page-builder
It's not possible. page-builder options are available only in shortcode view.php
Ok Thanks. Then is fw_get_post_option() only for blog posts because it returns the current pages options if printing from the view?
Yes, fw_get_post_option() is only for post options (any post type, not only blog posts)