Add input field to ‘Pages > Edit Page’ through functions.php

functions.php // Add custom Slider ID field to ‘Edit Page’ add_action( ‘add_meta_boxes’, ‘cd_meta_box_add’ ); function cd_meta_box_add() { add_meta_box( ‘my-meta-box-id’, ‘Slider’, ‘cd_meta_box_cb’, ‘page’, ‘normal’, ‘high’ ); } function cd_meta_box_cb( $post ) { $values = get_post_custom( $post->ID ); $text = isset( $values[‘my_meta_box_text’] ) ? esc_attr( $values[‘my_meta_box_text’][0] ) : ”; wp_nonce_field( ‘my_meta_box_nonce’, ‘meta_box_nonce’ ); ?> <p> <label for=”my_meta_box_text”>Add … Read more

Quicktags on all textarea.. Not working on plugin?

it you’re not seeing the buttons, try to call QTags._buttonsInit(); right after you call the quicktags( settings ); function. quicktags(settings); QTags._buttonsInit(); Following also works for me qt_editor = new QTags( { ‘id’: ‘my_editor’, ‘buttons’: ‘strong,em,link’ } ); QTags._buttonsInit(); Also, it seems that adding a button via QTags.addButton() function also makes your toolbar to display qt_editor … Read more

Get user id from email?

You are probably looking for the user_exists function. http://codex.wordpress.org/Function_Reference/email_exists This function will check whether or not a given email address ($email) has already been registered to a username, and returns that users ID (or false if none exists). If the email address does not exist (user_exists returns false), you may want to use the wp_create_user … Read more

Add extra field to users

your function never defines a value for that field so when you check if its equal to 1 you never get true. try this: add_action( ‘show_user_profile’, ‘module_user_profile_fields’ ); add_action( ‘edit_user_profile’, ‘module_user_profile_fields’ ); function module_user_profile_fields( $user ) { ?> <h3>Module Options</h3> <table class=”form-table”> <tr> <th><label for=”module_activation”>Module Activation</label></th> <td> <input id=”module_activation” name=”module_activation” type=”checkbox” value=”1″ <?php if ( … Read more

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