I’d recommend creating your own plug-in for storing and updating these options.
To add the defaults, simply use the add_option function and to pull them into your custom metabox, when you check for the custom post meta, if it isn’t found, echo out the appropriate option using get_option.
You can always just hard-code the values into the add_option statement, but if you make a small plug-in with a page where you can edit them, you’d possibly save yourself time and trouble in the future if you ever need to update the defaults.
Let me know if you need some help implementing this, I’ll need to take a look at your metabox code to help, though.
Related Posts:
- How can I add an image upload field directly to a custom write panel?
- How do I improve this admin query snippet to avoid generating duplicate results on non-meta searches?
- How to validate custom fields in custom post type?
- How to add tab which is visible only in admin side of product in woocommerce? [closed]
- Creating custom field with drop down on new post page
- Save metabox with multiple checkbox array
- Retrieving custom fields with $wpdb->get_results
- How to create Image gallery Metabox in wordpress [closed]
- Utilize TinyMCE hyperlink chooser outside of TinyMCE
- anything like add_meta_box for categories?
- template_redirect for single posts w/ custom fields
- Support auto-save and revisions for custom fields
- Best choice of options/settings framework for plugin/theme development
- Ordering posts by metadata
- get_posts() not working when accessing with a custom user role
- Custom Taxonomy to dropdown box on adminside wordpress
- Create & Save multiple Meta-boxes
- Saving value of a selection option in comment form as comment meta
- Strange issue saving custom field data for a WooCommerce order
- Woocommerce – Convert Delivery method into a custom field
- How to get Metabox custom field to show checked if value is updated using post meta query?
- How do I update a field of a meta box?
- Input value from metabox is not found in $_POST after post save
- Run Shortcode of post’s custom field in functions.php / Plugin
- Custom code for WordPress dynamic menu
- Checked() function on a multidimensional array
- What is the best way to store a few fields?
- Delist entries in the_loop
- Remove entire [$key] from array stored in custom field using Ajax – unset($array[$key]); not working
- How can I add a simple custom field to my plugin?
- Ajax is not working in a loop
- How to save post meta as an array in Gutenberg?
- Issues Updating Post Meta with AJAX (Seems simple but cannot figure it out)
- per blog metadata for plugin
- How to format custom fields when editing an attachment?
- Any way to update_post_meta with html content? It gets stripped and becomes empty
- how to add custom fields into new & update post page?
- Customise Grouped Product display in Woocommerce with custom column
- WP_Query not ordering correctly
- Adding customs fields on each product on the cart
- add_meta_box does not display meta box in Admin
- How and when would I implement some code which would take data from one part of the Db and put it in another?
- Displaying Custom Post Meta
- How can i call from custom fields to the category editor?
- I want to display the content of a text field only if it has been entered
- Create Unique and Customized User ID for Website Members in WordPress
- Can I log the searches that are returning 404 in the DB?
- Custom fields in the billing address section woocommerce
- Add File field in WooCommerce Box office plugin
- Objective Best Practices for Plugin Development? [closed]
- add_menu_page() with different name for first submenu item
- Autoloading & Namespaces in WordPress Plugins & Themes: Can it Work?
- How to include PHP files in plugins the correct way
- A tool to analyze rewrite rules? [closed]
- Difference Between Filter and Action Hooks?
- framework for plugin/theme options panel? [closed]
- Creating a table in the admin-style?
- How can you check if you are in a particular page in the WP Admin section? For example how can I check if I am in the Users > Your Profile page?
- Settings API with arrays example
- How to get the path to the current theme?
- How to make a plugin require another plugin?
- ajaxurl not defined on front end
- What process do you use for WordPress development? [closed]
- What’s the difference between term_id and term_taxonomy_id
- Should I use wpdb prepare?
- Why does WordPress use outdated jQuery v1.12.4?
- Post meta vs separate database tables
- Is there any plugin development framework
- Is it possible to reuse wp.media.editor Modal for dialogs other than media
- How to add a javascript snippet to the footer that requires jQuery
- Enhance Media Manager for Gallery
- How do I create a custom role capability?
- How do I add CSS options to my plugin without using inline styles?
- How do i best handle custom plugin page actions?
- Adding Custom Text Patterns in the WP 4.5 Visual Editor
- Automatically determine minimum WordPress version required for a plugin?
- What is the advantage of using wp_mail?
- How to make a WordPress plugin translation ready?
- How many times will this code run? (or, how rich is grandma?)
- How to create an API for my plugin?
- Is it ever okay to include inline CSS in plugins?
- Plugins in symlinked directories?
- How to override existing plugin action with new action
- How to include a file using get_template_part() in a plugin?
- Add custom TinyMCE 4 Button, Usable since WordPress 3.9-beta1
- How to store username and password to API in wordpress option DB?
- body_class hook for admin pages
- “Error: Options Page Not Found” on Settings Page Submission for an OOP Plugin
- Is it mandatory to use $wpdb->prefix in custom tables
- Which hook should be used to add an action containing a redirect?
- add_action hook for completely new post?
- Why does WordPress add 0 (zero) to an Ajax response?
- What should I use instead of WP_CONTENT_DIR and WP_PLUGIN_DIR?
- How to enqueue JavaScripts in a plugin
- In Which Contexts are Plugins Responsible for Data Validation/Sanitization?
- Plugin Form Submission Best Practice
- How to redirect to settings page once the plugin is activated?
- Is get_option function cached?
- Should Plugin Folders Include a Blank index.php File?
- Unit testing for plugin development