How do I create a section in the dashboard w/ an input field

This is pretty easy to do with the Dashboard Widgets API http://codex.wordpress.org/Dashboard_Widgets_API. Here are the steps I would take to create this: Queue up a jQuery script for AJAX handling Create a PHP AJAX function and corresponding AJAX hook for saving the form data Create the dashboard widget with HTML form input(s) Here’s a sample … Read more

Add custom post types stats to a custom dashboard widget

Lokks like you have a function declared inside another function, your code is wrong, try this: // wp_dashboard_setup is the action hook add_action(‘wp_dashboard_setup’, ‘mycustom_moviestats’); // add dashboard widget function mycustom_moviestats() { wp_add_dashboard_widget(‘custom_movie_widget’, ‘Movie Stats’,’custom_dashboard_movie_list’); } function custom_dashboard_movie_list(){ $args = array( ‘public’ => true , ‘_builtin’ => false ); $output=”object”; $operator=”and”; echo ‘<table>’; //loop over all … Read more

Frontend editing, Frontend user dashboard

I have Something that i use from time to time when i need something like that: <?php /* Plugin Name: List User Posts Plugin URI: http://en.bainternet.info Description: lists user posts on the front end Version: 0.1 Author: Bainternet Author URI: http://en.bainternet.info */ if (!class_exists(‘list_user_posts’)){ /** * list_user_posts * @author Ohad Raz */ class list_user_posts { … Read more

Create dropdown of users in admin dashboard

wp_dropdown_users accept for show arguments only field from the users table, not from user_meta table. If you enable debug, with your code, using ‘companyname’ for $show argument you will see something like: WordPress database error: [Unknown column ‘wp_users.companyname’ in ‘field list’] SELECT wp_users.ID,wp_users.user_login,wp_users.companyname FROM wp_users WHERE 1=1 ORDER BY display_name ASC So, solution is create … Read more

Add ‘Right Now’ widget to custom dashboard

I’ve got to know it in Make WordPress UI. The plugin Dashboard uses a very interesting technique: add_action( ‘load-index.php’, array( $this , ‘override_dashboard’ ) ); public function override_dashboard() { if( !isset( $_GET[‘page’] || ‘custom-dash’ != $_GET[‘page’] ) return; if ( get_current_screen()->in_admin( ‘site’ ) ) { require dirname( __FILE__ ) . ‘/dashboard-override.php’; exit; } } And … Read more

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