So i think I’ve found the answer to my own question. I modified the code in the original tablequerytest.php which queries the custom table and stores results from this:
<?php
global $wpdb; //Accessing WP Database (non-WP Table) use code below.
$results = $wpdb->get_results('SELECT alias FROM wp_revslider_sliders');
foreach ($results as $result) {
$revchoices = array("text" => $result, "value" => $result);
}
return $revchoices;
?>
To this:
<?php
global $wpdb;
$query = 'select r.id, r.alias from wp_revslider_sliders r';
$sliders = $wpdb->get_results($query, OBJECT);
foreach($sliders as $slider)
{
$field[$slider->alias] = sprintf('%s',$slider->alias);
}
return $field;
?>
Related Posts:
- Responsive Images – Generating multiple images from Theme Customizer control upload?
- Modify Javascript Configuration Options for Theme Customizer Colour Picker
- Modify the Additional CSS section (adding a disclaimer)
- Customizer: Unique identifier that distinguishes which image upload control is uploading an image
- Disabling Customizer Selective Refresh shortcut icons for selected controls
- JavaScript stops working on selectively refreshed sections one inside the other
- “Add A Widget” button in the Customizer
- Customizer: save setting/control content to post/page
- Is it possible to visually group items on the theme customizer?
- Customizer – loading settings/controls/sections/panels based on a id/page id
- Default Text not showing from customizer
- How to transfer one domain to another domain without losing theme options (customizer)?
- Is there a WordPress boolean for “theme_customizer_active()”?
- Customizer: get_preview_url() inside customize_save_after hook
- add shortcode support in customizer
- What is difference between add_theme_support and Theme Customization API?
- Text View (Code View) in WordPress Customizer TinyMCE Editor
- WordPress Customizer Help with FontAwesome Icon
- Customizer API way function is_customize_preview() works only in main page?
- trying to figure out how to use more that one image upload in the same section in theme customizer
- Theme Customizer not loading JS for live preview
- Custom Blocks as part of a theme
- Customize how a WordPress theme looks like in the Theme Selector
- WooCommerce: multiple input field for multiple product variations
- Integrate WooCommerce theme with a WordPress theme [closed]
- Widget Option is Missing
- How do you use WordPress for a website that’s not in a blog format?
- Change WordPress header color using customizer
- Child Theme header1.php file not overwriting parent theme’s header1.php file
- How to have content scroll over background
- WordPress Template Part in iFrame
- Is there any way to register custom background images like header images?
- Replace site title with logo when logo is uploaded in customizer using
- Why in the static pages of my theme are showing these information?
- Theme Customizer not displaying saved values in wp_head (CSS)
- How to make theme configurable
- Extending Twenty Eleven Theme
- Can I make a Customizer dropdown-pages list include private pages?
- How to allow certain PHP functions when using sanitize_callback in the word press customizer
- Customizer Color Control Not Working
- where is real values of variables?
- How to allow users to create their own website within my domain? [closed]
- How to clean up the theme for production?
- Templates without a loop, best practice?
- Doing context-aware previews in the WordPress Customizer
- How to set Post meta-box defaults based on the choices made by user in Customizer?
- Alignment Problem [closed]
- Avada Child Theme Development
- Questions from a new WP Dev [closed]
- searchform.php doesn’t work properly
- CSS added through customizer neglects the need of a child theme?
- Adding a new setting using Kirki or WP customizer with an if statement
- Theme customizer – can’t add section/settings
- Create something that can be added or removed in Customizer
- Theme logo metadata into template file
- How to add custom meta box when you have a custom page template file
- WP Customazation API doesn’t save the default Value
- Valid SQL query not returning results
- Clearing dummy data before launch
- How to call a widget in a loop at a specific iteration value?
- Right procedure when you develop a WP Website for a client
- Woocommerce Product attribute not imported with wordpress Importer [closed]
- New to WordPress – Read the Codex, Other Docs; Still Confused
- How to get DB options format without saving? [closed]
- Create theme for mobile phones and tablets only?
- How to add custom page elements to the WYSIWYG editor?
- Using the media library for theme customization
- Twenty Twelve Author not displaying
- Customize Option Framework
- Alternatives to handle customizer settings
- Update Specific Key Value in Complex `wp_options` object
- Can’t change theme name
- Remove/Hide a Widget on a Custom Template
- My contact form – I’ve changed the source code but the changes are not being applied
- How to custom category template based on category?
- How to use multiple check-box values to work in a function and insert values in database
- How to set a custom URL for the iframe in the customize page
- Related Post Category Filter
- How to add wysiwyg editor in customize screen using customize_register
- How to register dynamic settings in WordPress Customizer?
- Let user to upload multiple time
- How to copy page/post from one theme to another?
- How to change listing type permlink?
- In wordpress customizer div still showing even if I hid it with javascript
- How to enable admin to upload multiple images to support header carousel slider theme in WordPress?
- Removing element from DOM with jquery through plugin Custom Scripts for Customizer
- Why does wp_customizer default values do not apply when theme is installed for the first time?
- Customizer API Multi Sections in single Panel
- How to dynamically set a background image with the customizer without putting the css as an inline-style
- Default customizer colors aren’t displayed outside of the preview
- Image cropping isn’t working correctly when using Offload Media
- WordPress Custom Theme : Theme Builder vs ACF vs Gutenberg
- fetch all post from wp multisite network and sort all the post in descending order on the basis of “Created by ” term
- How Do I Create a WordPress Demo Site with Limited Admin Access
- Fatal error: Class WP_Customize_Image_Control not found
- (Parent) theme Is Not Showing In Theme Selection Panel and Therefore Breaks Child Theme
- How do I remove header/page-title image in farvis theme? [closed]
- How to show Custom Field Value in Woocommerce Shop Page
- Is hand coding required at all?
- How to show some of category in wordpress