Jump to content

tascam424

Members
  • Posts

    29
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

tascam424's Achievements

Member

Member (2/5)

0

Reputation

  1. I have a lot of learning to do and i think this could be a great way to push to learn. Just getting the correct direction and start point is what i need. Your response is extremely valuable. Thank you so much.
  2. Hi folks, i'm Jonny, very amateur coder on the learning path. I have inherited a web script that fails on anything above php 7.4, creating lots of 500 errors. Although it works i WAMP localhost on PHP 8.0.26 it will not function correctly on any live server above php 7.4 (this has been reported by many users across different hosting providers. So as it is no longer supported by the developer, i am going to attempt to make it compatible. My question to the community is, is there any kind of programmes that will assist me in doing so ? Maybe something that will find deprecated code and suggest a better way of coding for forward compatibility ? I look forward to hearing your thoughts and suggestions.
  3. 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 <?php 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"> <thead> <tr> <th colspan="5"><?php _e('Sliders List', 'crellyslider'); ?></th> </tr> </thead> <tbody> <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> </tr> <?php 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> </td>'; echo '</tr>'; } ?> </tbody> </table> <?php } ?> <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 array( '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 !
  4. Greatly appreciated ! I'm just learning all this and a point in the right direction is much more valuable than somebody pasting a code snippet. Nice to know i got it right too .. Thanks a lot !!
  5. Thanks for pointing me in the correct direction .. So i worked out a solution, but baring in mind i am an absolute newb, would you mind telling me if this is the cleanest way to achieve what i want. It works perfectly ! <?php $categories = get_the_category(); $category_names = array(); foreach ($categories as $category) { $category_names[] = $category->cat_name; } echo implode (',', $category_names); ?>
  6. Hi guys, i'm attempting to display Wordpress Categories per Post. I'm aware of this simple standard method <?php the_category( ', ' ); ?>. But i actually just want a list of the categories, unformatted and unlinked to the category itself, actually i just want the category name. So i am using this method <?php foreach((get_the_category()) as $category) { echo $category->cat_name . ' '; } ?> This works perfectly if the post only has 1 category, but in the event of multiple categories, there is no separator. Could anybody assist me in adding a separator which will not append to the last in the list ? I would be grateful for any assistance but please bare in mind i am a mere novice. Thanks
  7. Hi guys, i'm hoping someone can point me in the right direction here. I'm importing products into WooCommerce using WP All Import through a XML feed. I need a way to get certain data from the category field, which looks like this .. <range category='Cars'>Cars </range><range category='Vans'>Vans </range><range category='Lorries'>Lorries </range> I need to somehow convert this to Cars, Vans, Lorries I'm not really sure how to approach this, any help would be greatly appreciated.
×
×
  • 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.