MFP > Client Utilities

/** * ERC Utilities * */ function get_Cid($s_id, $user_id, $insert = null) { if (!$s_id || !$user_id) return null; $user = new WP_User($user_id); // if (!in_array(‘client’, $user->roles)) return null; $show = get_city($s_id) . ‘ ‘ . get_year($s_id); $loop = new…Continue reading

MFP > Client Utilities

/** * ERC Utilities * */ function get_Cid($s_id, $user_id, $insert = null) { if (!$s_id || !$user_id) return null; $user = new WP_User($user_id); // if (!in_array(‘client’, $user->roles)) return null; $show = get_city($s_id) . ‘ ‘ . get_year($s_id); $loop = new…Continue reading

Add Last Modified Column

add_filter( ‘manage_posts_columns’, function ( $columns ) { $columns[‘last_modified’] = __( ‘Last Modified’ ); return $columns; } ); add_action( ‘manage_posts_custom_column’, function ( $column, $post_id ) { if ( ‘last_modified’ === $column ) { $modified_time = get_the_modified_time( ‘Y/m/d g:i:s a’, $post_id );…Continue reading

Author Bio After Post

global $post; $author_id = $post->post_author; // Get author’s display name and biographical info $author_name = get_the_author_meta( ‘display_name’, $author_id ); $author_bio = get_the_author_meta( ‘description’, $author_id ); // Get author’s avatar $author_avatar = get_avatar( $author_id, 96 ); // Only display if author…Continue reading