How to store widget fields data as an array?

You have to collect multiple fields under the same name like this … name=”collect[1]” name=”collect[2]” … and adjust your widget logic to this. Here is a very simple demo widget: <?php # -*- coding: utf-8 -*- /* Plugin Name: Store Options as array */ add_action( ‘widgets_init’, array ( ‘T5_Array_Options_Widget’, ‘register’ ) ); class T5_Array_Options_Widget extends … Read more

Fetch array with $wpdb

wpdb‘s get_results method takes an optional second argument that lets you specify how the data is returned. The default return is an object. But you can also set it to… OBJECT – result will be output as a numerically indexed array of row objects. OBJECT_K – result will be output as an associative array of … Read more

WP Cron Doesn’t Execute When Time Elapses

First can you please confirm that you don’t have any caching plugins enabled? Caching plugins can interfere with cron jobs because your visitors are not served a live page but a cached version of your page. If you have a caching plugin enabled, you can choose one of your pages, add an exclussion to your … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)