Admin – create custom post status and display above table

You can use the answer given here: How to add a quicklink to the Posts Admin Published|Scheduled|Trash menu For e.g. Stephen Harris answered the same question to add an extra menu item for displaying today’s posts. add_filter( ‘views_edit-post’, ‘wpse_add_my_view’); function wpse_add_my_view($views){ global $post_type_object; $post_type = $post_type_object->name; $y =mysql2date(‘Y’, current_time(‘mysql’) ); $m =mysql2date(‘m’, current_time(‘mysql’) ); $d … Read more

Dashicons and Pseudo :before

The dashicons are only part of the WordPress admin area. So if you’re aiming for dashicons in the frontend you’ll have to enqueue the icon font within your function.php: add_action( ‘wp_enqueue_scripts’, ‘frontend_dashicons’ ); function frontend_dashicons() { wp_enqueue_style( ‘dashicons’ ); } Moreover you’ll not need to remember those cryptic icon values like \f161; simply add the … Read more

Filtering the post list in the admin area

I would suggest using post_submitbox_misc_actions action as shown in the below example to provide an option for Publish meta-box. <?php add_action( ‘post_submitbox_misc_actions’, ‘my_post_submitbox_misc_actions’ ); function my_post_submitbox_misc_actions(){ ?> <div class=”misc-pub-section my-options”> <label for=”my_custom_post_action”>My Option</label><br /> <select id=”my_custom_post_action” name=”my_custom_post_action”> <option value=”1″>First Option goes here</option> <option value=”2″>Second Option goes here</option> </select> </div> <?php } ?> Once used for … Read more

Super administrator db name

The administrator role is defined by the capabilities the user has. Those are stored in the wp_user_meta table for each user. If you’re on multisite, an additional set of capabilities is assigned to a Super Admin. The Codex tells us what capabilities we can check for in code to see if a user is an … Read more

InfiiniteWP and WP Networks (multisite)

I think I figured this out. I wanted to leave my findings here with the hope that others can correct anything I may have erred on or findings I have misinterpreted. Testing Method: I set up a new vagrant install with a lamp stack (sudo apt-get install lamp-server^). I first set up wp_cli — the … Read more