JS plugin script loading but not working

WordPress-specific script issues are generally limited to one of the following: Improperly enqueued script Proper script enqueueing involves use of wp_enqueue_script(). If the script is properly enqueued, you will see a <script….> link in the document head or footer Not accounting for jQuery no-conflict mode WordPress-bundled jQuery is configured for no-conflict mode, which requires wrapping … Read more

How to add a nested shortcode into editor?

You can do it developing a TinyMCE plugin and load it using mce_external_plugins hook. The key is in the javascript file of the TinyMCE plugin which will be responsible to pass the nested shortcodes into the editor textarea. You can take a look to this article (about the middle they shows an example of how … Read more

Custom Query problem access the values

You’ve asked for an array and you are trying to use an object. $key = “sc_event_year”; $value = $today_year; global $wpdb; $results = $wpdb->get_results(“SELECT * FROM $wpdb->postmeta WHERE meta_key = ‘sc_event_year’ AND meta_value = $value”, ARRAY_A); foreach ($results as $result){ echo $post_id = $result[‘post_id’]; // <– here was the problem } Unless $value is a … Read more