WordPress version quick check?

I’m not the only one with this problem. The simplest way I feel is the site wide readme.html method or the wp-admin/about.php method. This wordpress post has four ways to check and this question on stackoverflow had good info. I looked and looked but couldn’t see it in the At a Glance box until later … Read more

Build Form on Dashboard

After did many trials and errors, finally I found the answer. Just in case anyone wondering how this working, I put the full code right here : /* == THEME OPTIONS == */ add_action(“admin_menu”, “setup_theme_admin_menus”); function setup_theme_admin_menus() { add_submenu_page(‘themes.php’, ‘Generate Coupons’, ‘Generate Coupons’, ‘manage_options’, ‘generate-coupons-elements’, ‘theme_generate_coupons_settings’); } function theme_generate_coupons_settings() { ?> <div class=”wrap”> <?php screen_icon(‘themes’); … Read more

display wordpress user who published a pending post of another user

get_the_modified_author(); isn’t going to tell you who published the post, just who last edited it. You will need to capture you publisher yourself. function post_published_notification( $ID, $post ) { $publisher = wp_get_current_user(); update_post_meta($ID,’my_publisher’,$publisher); } add_action( ‘publish_post’, ‘post_published_notification’, 10, 2 ); Then use get_post_meta($post_id,’my_publisher’) to retrieve the data. Of course there are a numerous ways to … Read more

Adding options to loop

You can use the add_meta_boxes hook to place a text field in the desired pages. Then on the template page you can check whether the user has entered some categories (display all categories if not) and filter the loop using the WP_Query, query_posts() or get_posts(). Here is an excellent article on the three methods.