You can use get_option
to get your option values. Below is an example
<?php
$selected_name = get_post_meta( get_the_ID(), 'your_meta_key', true );
$options = get_option( 'your_options' );
// If your names are separeated with comma
$names = explode( PHP_EOL, $options);
?>
<select name="your-select-name">
<?php foreach ( $names as $name ) {
printf(
'<option value="%s" %s>%s</option>',
$name,
selected( $name, $selected_name, false ),
$name
);
} ?>
</select>
Related Posts:
- How to create a Page alias in WordPress
- php page not found for plugin options menu
- Upgrade 4.5.2 to 4.5.3 deleting row in wp_options table
- Pass PHP variable to javascript
- Modifying a JS file with data from plugin settings
- Is there a hook attached to general settings save?
- Best way to manage a lot of pages in Wp Admin [closed]
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- Pages with 2 Columns
- Add custom meta box on Post page
- Is there a way to lock certain pages from being edited by anyone other then the admin?
- Replace existing pages with new pages, keep menu links
- How to show category images (from plugin) on a regular page (page-example.php)?
- WooCommerce “Save Changes” button appears inside custom settings
- [Plugin: Posts 2 Posts] How does it work?
- Remove obsolete plugins artifacts from database tables
- Why is the Settings API is not saving my array of options
- Copyright messages for a particular set of pages
- Add get_option to jquery
- How can plugins have their own pages?
- Add a plugin before main container
- Can’t get plugin settings page to save data
- How do i save plugin-specific info?
- How can I add an options page for my class based plugin?
- problems with wordpress and php version 5.3.3-1
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- View Private Published Page with URL Code (no login required)
- Create mobile navigation header with settings integration
- Admin Theme customization
- How to get specific setting by settings_fields()?
- WordPress web pages keep getting deleted (moved into the trash) by themselves
- Run plugins only on certain pages
- (FES EDD) New vendor submission page is blank
- Add Plugin options as subpage to Theme options page
- Changing page URL and connect newsletter to MailChip
- wp_editor content in plugin options page
- WordPress page and plugin list using sql query
- How do I write an inventory list plugin that creates dynamic details pages?
- Can I allow certain people to add/edit pages within a parent?
- How to create an option page for this simple plugin
- Gathering and logging data from a plugin: how to do it without race conditions?
- Update a core option from plugin settings page
- Can I use register_settings and unregister_setting once the settings page has loaded?
- Updating options into the wp database performance
- Change the style of h1, h2, only in post entry
- How to add options to the plugin page?
- Thesis 2 custom Page
- Default plugin config to override wp_options?
- Simulating a wp page – wp page load sequence
- get_option / wp_localize_script Not Working in OOP Plug In
- How (or where) do I get wordpress plugin update download link?
- Get post content from outside the loop with plugin shortcode usability
- Adding option values as an array using a multi selectable select box
- Custom form not showing in correct place on page
- Every time I save my plugin options it erases another plugin options
- Use jQuery Datepicker code from plugin
- How to force load a page in plugin?
- Multisite Plugin – Access options (wp_options) on child sites
- Is there a syntax highlighting plugin for HTML View? [duplicate]
- Gantry Framework: new page loads homepage content instead of page content
- Color Picker UI in admin is not correct
- Pass PHP variable to javascript
- How to permanently show Word Counter on Create/Edit Page. WordPress5.9.3
- Save log for imports in WordPress database – options-table, custom post type or other place?
- Managing and deleting transients with dynamically generated transient names
- Copy/paste local images not working in WordPress
- Elementor: How to design Dropdown Select Box Navigation page like Chegg
- create pages automatically and dynamically in wordPress
- Creating an array from form inputs before it is posted to the options database
- What plugin would make this happen? If is the theme
- How to allow URL with filename & extension in wordpress?
- save short-code in my custom plugin settings problem missed something
- Plugin Options Page and Subpage
- save multi-select input using update_option for plugin
- Python in WordPress – A “Hello World” implementation
- Echo custom admin field into a is_single()
- Protect WordPress option value
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- How to store multiple instances of the plugin’s options for various shortcodes
- Manual Backup – How to save to Firefox or Chrome (instead of IE which brings up popup I can’t get rid of)
- Add_Meta_box to custom page (formidable edit post)
- Register setting on plugin activation
- How to remove a css class for any wordpress page
- Plugin option for input box validation
- Hidden Some Setting on Post or Page [duplicate]
- Add a checkbox in plugin options page and make it actually work
- Better code/text editing for posts and pages?
- Restrict my pages from public
- Is saving multiple options or saving multiple items in one option better?
- Saving an array to get_options
- ‘all’ hook and get_option issue
- Fake Single WordPress Post (Page) Loop
- How to find an option in the database?
- How to set different users for different pages?
- Building a simple “settings” plugin to change textstrings on the home page
- Update title field while listing wordpress page titles in Elementor selector
- Neither update_option nor delete_option fires in deactivation hook
- Meta box not displaying on the plugin page
- move setting data from wordpress api to codestar freamwork
- How to access the page without registering in wordpress