I’m quite sure the problem is not with the WordPress hook you’re using. Instead, the following:
Cannot find
$_FILES
, in$_POST
, there’s the filename
.. is most likely because your form tag (<form>
) does not have the required enctype
attribute which must be set to multipart/form-data
to make file upload input works in that the file gets uploaded to the server — without setting the enctype
to multipart/form-data
, the input still works (i.e. you can select a file that you want to upload), but it’ll work like a standard input field where the browser submits only the file name (e.g. my-image.png
) and not the actual file itself (which PHP puts in the $_FILES
).
So make sure your form tag has the attribute enctype="multipart/form-data"
:
<form method="post" action="options.php" enctype="multipart/form-data">
...
</form>
Related Posts:
- Are transients garbage collected?
- Are all options loaded to memory on each request?
- How to pass variable to add_settings_section() callback?
- Using widget options ‘outside’ the widget
- How to load WordPress on non WP page?
- Difference between Option_Group and Option_Name in Register_Settings
- Why does WordPress use serialize rather than json_encode for the options table? [duplicate]
- Plugin options will not save in database
- How to Create a Custom WordPress Install Package?
- Settings API – creating reusable form elements?
- Efficient way of saving plugin options
- register_setting() vs add_option()
- Where to hook register_settings for Settings API when also want to update options outside of Settings API?
- How much string content can I store in an option?
- Why isn’t get_option array contents displaying?
- How to Save Different Settings Options Using Settings API and/or the Theme Optimizer
- Define WordPress image size in img tag
- get_option() is not working even db contains the corresponding option_name and option_value
- Proper use of option_page_capability_{$page_name}
- Which WordPress option stores the current active theme?
- update_option method with support of utf8
- Can I use a space in an option name/key?
- How to save WordPress Options as an array?
- update_option not working in stand-alone PHP script
- How to verify this checkbox is checked?
- What to use , set_transient, set_option or file system? [closed]
- Settings API get_option best practices
- Custom theme options Radio inputs not saving
- Deploy pre-configured database
- Tab from Settings API resetting all options with INSERT INTO [closed]
- display all posts in wordpress admin crashing after 999 screen option
- Allow spiders to crawl my site (selectable option in wp)
- Putting my site live
- get_option array value defaults and best practices
- Add an option to a Child theme of Twenty Eleven
- The Settings API – What is the purpose of default value in register_setting?
- WordPress options page not saving
- How to store a value on WP_option table
- Changing the language in Site Language does nothing
- Two settings_fields in one form
- Custom blog settings
- wp_usermeta wp_usersettings
- Can’t save checkbox option
- How to set wp_editor to be email friendly?
- Work flow for multiple developers
- i changed my wordpress address url in SETTINGS – GENRERAL – wordpress address site url. cannot login anymore
- update object options on option form
- Functions to edit wp-config.php [duplicate]
- Saving plugin options page
- Transients API conditional
- How to use a newly registered setting with a checkbox and the default value ‘true’
- help using get_option
- Testing for addon plugin activated
- How to check False booleans when using get_option?
- Where have the Privacy Settings gone in WordPress 3.5?
- Is there any other place – besides a theme, a plugin, or a mu-plugin – that an option page might conceivably be used?
- How to save custom settings api fields with custom section fuction
- Custom options in plugin, register_settings not working as no options.php?
- Verify Values Using Settings API
- How can I increase the font sizes used by the WordPress visual and HTML post editors?
- Which Hook can I use when creating unique post but not update/save/delete
- How to use update_option() without replacing/losing the old value?
- Settings API and ‘type’ => ‘font’
- Create a counter variable in wp_options that increments when submit button is pressed
- Assigning a Setting to a Variable and Using it in an if Statement
- Options page: values don’t show up in dashboard
- WordPress get_option() on AJAX issue
- WordPress Settings API settings not saving for some users
- Sharing Buttons not Working – Sharing Settings [closed]
- Character \ appearing before ‘ after saving a settings page
- Theme Option select values
- How to add a Reset to Defaults button with Settings API?
- Settings API no update status? (refering to the yellow bar when you save settings)
- PHP class to add pages and fields in admin panel
- get_option() and update_option() in a transaction (for an autoincrement value)
- How to change color of a word in text after WP update
- display category name based on its equivalent id
- Option value not get saved in the database
- Is it possible to have a global parameter page which allows to configure other plugins in the same place?
- Help to create the best plugin settings!
- Encoding matter – ? instead of € after settings field callback
- Problem with checkbox in Settings API
- add image in dropdown select
- Access saved Options / Settings
- Repeatable option fields not saving
- Settings API retrieving options database information alongside with user information?
- Dynamically Update Key in Associative Array When Saving Settings
- Incorporating the Settings API in WordPress Themes – by Chip Bennet
- Option does not save or update upon page refresh
- WordPress options text format
- Caching of SQL queries
- WordPress theme options tabs
- Importing WP settings to another host
- Only show theme option if it option exists
- The issue of redirecting my site to a new domain
- Custom general settings (textarea field) don’t output HTML correctly
- Using get_option() for check box field
- Where to adjust presets for slider options “auto rotate” (3, 5, 10, 15 seconds)? [closed]
- change backend header options
- If Home Page Do Nothing, If All Else Show This Content