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
- ‘Global’ settings page for multisite plugin
- How to add field for new site-wide option on Network Settings screen?
- Pass PHP variable to javascript
- Contact form 7 select box different value-text than content-text in option [closed]
- Is there a way (plugin?) to restrict a user to being able to edit just one page?
- Modifying a JS file with data from plugin settings
- Correct way to serialize the data of options table?
- Creating a WordPress admin page without a menu for a plugin
- What is the best page ordering plugin that works well with WPML? [closed]
- Where should I use get_option in a plugin
- Inherit plugin settings to new site in Multisite
- How to tell if plugin has been network activated
- Is there a hook attached to general settings save?
- Best way to manage a lot of pages in Wp Admin [closed]
- Create page when plugin is activated
- How to find out if option exists but is empty?
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- Custom plugin settings: clicking “save changes” does not display success message
- jQuery plugin only in one page/post
- How can I show drafts in wp_dropdown_pages list?
- Duplicate settings of master blog to slave blogs in WP multi-site installation
- Environment Specific Options Token
- How do I extract the Alt Text from an image attachment upload via the WordPress Options Framework Plugin?
- Network-Wide Plugin Settings Management
- Pages with 2 Columns
- How to fetch serialized data from wordpress options
- Add custom meta box on Post page
- WP-PageNavi plugin doesn’t work with multiple pages of search results
- How to extract images of post and pages excluding header and logo image in wordpress?
- Some Plugin Settings Are Kept After Removal and Reinstall of the Plugin
- Changing widget options via the functions.php when there are no hooks
- While Using Static Pages, How Can I Get /blog into the URL of Each Post?
- Get all options saved by another plugin
- How to exclude a widget from page 1 of a paginated post
- add_meta_box Callback not being called
- Is there a way to lock certain pages from being edited by anyone other then the admin?
- Is it ok to call get_option without hooks?
- Enable/Disable WP options programmatically
- Custom options page checkbox will not save, despite working with text
- Settings API – input always updates over validation
- Replace existing pages with new pages, keep menu links
- How to show category images (from plugin) on a regular page (page-example.php)?
- add function to saving change on Options Pages
- WooCommerce “Save Changes” button appears inside custom settings
- clean wp_options table unused rows
- [Plugin: Posts 2 Posts] How does it work?
- How to set CORS header?
- Prepare plugin options for multi-lingual support
- Creating a menu page in a Object Oriented developed plugin
- Distributing and packaging plugins
- Custom Text Under Navigation Links
- Set a category for a page
- Automatically adding post and pages to new blog setups
- Is there a reliable way to keep track of how long a WordPress theme has been active?
- Remove obsolete plugins artifacts from database tables
- Restore a Plugin’s Default Settings
- add action wp_head not working
- How to debug register_setting callback function
- Why is the Settings API is not saving my array of options
- Creating a plugin that will add options. Where should the options menu pages go?
- Copyright messages for a particular set of pages
- Add get_option to jquery
- Show a special message for private page?
- How can plugins have their own pages?
- wordpress reusable content blocks
- Add a plugin before main container
- update_user_meta add value on the top on existing value
- Can’t get plugin settings page to save data
- Default Plugin Settings Not Writing to Database
- Update Option Error: Notice: Undefined index
- Wondering what these multi-colored extra pages are?
- Create a custom page template inside my wordpress plugin
- How do i save plugin-specific info?
- Set the active Navigation Menu from a plugin
- Serialize data for wp options
- How can I add an options page for my class based plugin?
- problems with wordpress and php version 5.3.3-1
- Why slash is removed after domain?
- Where does WordPress store plugin (enabled/disabled) status for multisite?
- How to add a default value to get_option if it’s used as a variable?
- View Private Published Page with URL Code (no login required)
- Do action only on certain front end pages?
- WordPress get_option and update_option returned entered on the textbox field
- Get plugin option in another PHP file
- Create mobile navigation header with settings integration
- Image upload and other options in the same plugin settings form?
- Admin Theme customization
- How to get specific setting by settings_fields()?
- How to delete page by deactivating plugin
- 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
- changes to widget settings not showing up in individual pages pages until they’re updated [closed]
- Show admin notice on incorrect value on form field
- How to remove traces from widget during uninstallation
- WordPress plugin/theme or other wayout to create portable pages?