How can I add a button to quicktags-toolbar?

Try adding the following code in your function.php add_action( ‘admin_footer-post-new.php’, ‘wpse_64665_add_quick_tag’ ); add_action( ‘admin_footer-post.php’, ‘wpse_64665_add_quick_tag’ ); function wpse_64665_add_quick_tag() { ?> <script type=”text/javascript”> edButtons[edButtons.length] = new edButton( ‘„“’, ‘„“’, ‘„’, ‘“’, ” ); </script><?php }

multiple comment text areas

To add new fields, simply append them to the default fields with a plugin. <?php defined( ‘ABSPATH’ ) AND exit; /* Plugin Name: (#85059) Append form fields to comment form */ add_filter( ‘comment_form_default_fields’, ‘wpse85059_comment_form_extd’, 100 ); function wpse85059_comment_form_extd( $fields ) { // Append new fields … if ( ‘comment_form_default_fields’ === current_filter() ) { foreach ( … Read more

Outputting Page Content in Two Places

As per vancoder‘s comment under the OP’s question: Make each product a post (a Custom Post Type if you like), and associate two new taxonomies with it: brand and type. This give you lots of flexibility in how you organize and present your posts. No tags are necessary. The codex is your friend: Custom Taxonomies.

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

How to change “Dashboard” text in wordpress

If you put the code below on your functions you should be able to filter the global $title easily on the admin_head action. <?php add_action( ‘admin_head’, ‘q167372_dash_name’ ); function q167372_dash_name( ){ if ( $GLOBALS[‘pagenow’] != ‘index.php’ ){ return; } $GLOBALS[‘title’] = __( ‘Your new Title’ ); }

Allow comments without approval for custom content type

Yes, it is possible using wp_insert_comment hook. To approve comments automatically for custom post types you can use something similar to this: //hook to do stuff with comments add_action( ‘wp_insert_comment’, ‘approve_comment’, 99, 2 ); function approve_comment($comment_id, $comment_object) { //get id of the post that was commented $post_id = $comment_object->comment_post_ID; //approve comment for “post” type if( … Read more

Add custom column to Users admin panel with Types user custom fields?

To fix the error, you can do something like this: function new_modify_user_table_row( $val, $column_name, $user_id ) { $user = get_userdata( $user_id ); switch ($column_name) { case ‘les-non-specialistes’ : return get_the_author_meta( ‘les-non-specialistes’, $user_id ); break; case ‘specialistes’ : return ”; break; default: } return $val; //<– Changed } Regarding the date, which date are you looking … Read more

Only append custom classes to nav menu items

Yes, they’re stored as metadata ‘_menu_item_classes’ for each menu item so eg (updated to use separate function) function custom_wp_nav_menu_css_class( $classes, $item, $args, $depth ) { $whitelist = array( //List of allowed menu classes ‘current_page_item’, ‘current_page_parent’, ‘current_page_ancestor’, ‘first’, ‘last’, ‘vertical’, ‘horizontal’ ); // Note array containing empty entry always created for menu item meta so filter … Read more

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