Nuxy
Search…
Nuxy
Installation
Adding Page Options
Adding Post Options
Adding Taxonomy Options
Adding Frontend Options
Getting Fields
Adding to admin bar
Tabs
General tab parameters
Add submenu
Field parameters
Registering field
Fields dependency
Fields group
Field types
General field parameters
1. Text
2. Number
3. Textarea
4. Checkbox
5. Select
6. Radio
7. Color
8. Image
9. Editor
10. Autocomplete
11. Datepicker
12. Datepicker range
13. Time
14. Sortable
15. Sortable multi input
16. Gallery
17. Repeater
18. Range slider
19. Image Select
20. Button group
21. Icon picker
22. Ace Editor
23. Spacings
24. Link color
25. Multi checkbox
26. Color Gradient
27. Textarea with hints
28. Typography
29. Multiselect
30. Notification Message
31. Button List
Download Nuxy
Powered By
GitBook
Adding Post Options
Modify your post/custom post type with brand new settings
WordPress powered with Post Type meta boxes. Add Meta Box to the desired post type with a unique ID.
1
add_filter('stm_wpcfto_boxes', function ($boxes) {
2
​
3
$boxes['my_metabox'] = array(
4
'post_type' => array('post', 'my-custom-post-type'),
5
'label' => esc_html__('Post settings', 'my-domain'),
6
);
7
​
8
return $boxes;
9
});
Copied!
And we need to add fields to this Meta Box:
1
add_filter('stm_wpcfto_fields', function ($fields) {
2
​
3
$fields['my_metabox'] = array(
4
​
5
'tab_1' => array(
6
'name' => esc_html__('Field Settings', 'my-domain'),
7
'fields' => array(
8
'field_1' => array(
9
'type' => 'text',
10
'label' => esc_html__('Field text', 'my-domain'),
11
),
12
)
13
),
14
​
15
);
16
​
17
return $fields;
18
});
Copied!
Custom Fields
You can easily use default WordPress functions such as
get_post_meta()
,
get_option()
or
get_term_meta()
. But for the option we built-in function to get any param you want:
1
$options = stm_wpcfto_get_options('my_awesome_settings');
Copied!
Previous
Adding Page Options
Next
Adding Taxonomy Options
Last modified
1yr ago
Copy link
Contents