Jump to content

PHP Help Redux Framework


Recommended Posts

I'm trying to out put all Crelly Slider Alias's within Redux Framework Options in a Dropdown Select.


I must confess i'm a novice at PHP ... I've attached the code from within Crelly Slider to show how it outputs the Alias names and i've also attached the Redux Code for the dropdown with an existing select .. I somehow need to output a list of all Crelly Alias's into

'options'	=> array( 'asc' => 'Ascending', 'desc' => 'Descending' ),

Obviously replacing the exisiting options.


Here is the full Crelly Output

global $wpdb;
$sliders = $wpdb->get_results('SELECT * FROM ' . $wpdb->prefix . 'crellyslider_sliders');

if(!$sliders) {
	echo '<div class="cs-no-sliders">';
	_e('No Sliders found. Please add a new one.', 'crellyslider');
	echo '</div>';
	echo '<br /><br />';
else {
	<table class="cs-sliders-list cs-table">
				<th colspan="5"><?php _e('Sliders List', 'crellyslider'); ?></th>
			<tr class="cs-table-header">
				<td><?php _e('ID', 'crellyslider'); ?></td>
				<td><?php _e('Name', 'crellyslider'); ?></td>
				<td><?php _e('Alias', 'crellyslider'); ?></td>
				<td><?php _e('Shortcode', 'crellyslider'); ?></td>
				<td><?php _e('Actions', 'crellyslider'); ?></td>
			foreach($sliders as $slider) {
				echo '<tr>';
				echo '<td>' . $slider->id . '</td>';
				echo '<td><a href="?page=crellyslider&view=edit&id=' . $slider->id . '">' . $slider->name . '</a></td>';
				echo '<td>' . $slider->alias . '</td>';
				echo '<td>[crellyslider alias="' . $slider->alias . '"]</td>';
				echo '<td>
					<a class="cs-edit-slider cs-button cs-button cs-is-success" href="?page=crellyslider&view=edit&id=' . $slider->id . '">' . __('Edit Slider', 'crellyslider') . '</a>
					<a class="cs-delete-slider cs-button cs-button cs-is-danger" href="javascript:void(0)" data-delete="' . $slider->id . '">' . __('Delete Slider', 'crellyslider') . '</a>
				echo '</tr>';

<br />
<a class="cs-button cs-is-primary cs-add-slider" href="?page=crellyslider&view=add"><?php _e('Add Slider', 'crellyslider'); ?></a>

And my Redux Option

				'id'		=> 'alias_select',
				'type'		=> 'select',
				'title'		=> __( 'Alias Select', 'ultra-web-admin' ),
				'desc'		=> __( 'Select Slider Alias.', 'ultra-web-admin' ),
				'options'	=> array( 'asc' => 'Ascending', 'desc' => 'Descending' ),
				'default'	=> 'asc'

I would be really grateful if anyone could assist me .


Thank you !

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.