How to list events by category and month with plugin Event Organiser?

You can use the plug-in provided function eo_get_events(). This is essentially a wrapper for get_posts(), and so is intended for ‘secondary’ loops. The plug-in specific arguments can also be given to a WP_Query object – in case you wanted to modify the main loop. (Related: When to use WP_query(), query_posts() and pre_get_posts ) $events = … Read more

Error with Custom Admin Screen in iframe Thickbox

Interesting question. Investigating it, I’ve found a [wp-hackers] thread by the same Dion Hulse which gives a bit more of information. First, a testing page with a simple link which will open another admin page in a thickbox. add_action(‘admin_menu’, ‘wpse_71437_admin_submenu’); function wpse_71437_admin_submenu() { add_menu_page( ‘TB’, ‘<span style=”color:#e57300;”>Thickbox</span>’, ‘edit_pages’, ‘open_hidden_page_in_thickbox’, ‘wpse_71437_submenu_page’, ”, // no icon 1 … Read more

How does uninstalling WordPress plugins work?

As explained in my comment in the Question, the error is certainly in how the DROP TABLE is being performed. But answering to How does uninstalling WordPress plugins work?: If we do a register_uninstall_hook in our plugin, the callback is stored in the option uninstall_plugins in /wp-includes/plugin.php. $uninstallable_plugins[plugin_basename($file)] = $callback; update_option(‘uninstall_plugins’, $uninstallable_plugins); In the PHPDoc … Read more

Determine which theme location a wp_get_nav_menu_items is for

Not sure this is the simplest means, but you could conditionally add the filter to just the location you want to modify via wp_nav_menu_args filter when wp_nav_menu is called, then immediately remove the filter so it isn’t applied to other menus. function wpa108544_nav_menu_args( $args ){ // check if it’s the location we want the filter … Read more

Custom theme sufficient or custom plugin neccessary for this feature set?

WordPress will not automatically provide these features. From what you are describing, you will want to create custom post types, a taxonomy or two for classification and custom fields for the post types. You COULD build all of this into a WordPress theme but the generally advised approach is to wrap your functionality into one … Read more

In a plugin, why is add_action(‘init’) not executed before the plugin is activated?

WordPress is an application and everything that is run within that application is called by hooks. Then 2 main hook functions are add_action and add_filter, but as you saw, register_activation_hook and register_deactivation_hook are other functions that are used in the context of activation and deactivation. There exist more hook defining functions, like functions that will … Read more

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