Generated Snippet Post Type

// Register Custom Post Type function deathwish() { $labels = array( ‘name’ => _x( ‘Deathwishes’, ‘Post Type General Name’, ‘text_deathwish’ ), ‘singular_name’ => _x( ‘Deathwish’, ‘Post Type Singular Name’, ‘text_deathwish’ ), ‘menu_name’ => __( ‘Deathwishes’, ‘text_deathwish’ ), ‘name_admin_bar’ => __(…Continue reading

Beecee – My coach WpdataTables (SC_Coach_wpdatatable)

function FN_Coach_wpdatatable ( $atts ) { // Initialize user_id to empty $user_id = ”; // Get the user ID from dropdown list post form if (isset($_POST[‘action’]) && $_POST[‘action’] === ‘Beecee_GroupLeader_user_do’) { $user_id = intval($_POST[‘user-id’]); } // Check if $user_id is…Continue reading

Order WPCode snippets by title in the admin

add_filter( ‘wpcode_code_snippets_table_prepare_items_args’, function( $args ) { if ( ! isset( $_GET[‘orderby’] ) ) { $args[‘orderby’] = ‘title’; } if ( ! isset( $_GET[‘order’] ) ) { $args[‘order’] = ‘ASC’; } return $args; });Continue reading

Export Categories and Tags

function export_tags_and_categories() { $terms = get_terms( array( ‘category’, ‘post_tag’ ), array( ‘hide_empty’ => false ) ); $output = fopen( ‘php://output’, ‘w’ ); fputcsv( $output, array( ‘Term ID’, ‘Name’, ‘Slug’, ‘Description’, ‘Taxonomy’ ) ); foreach ( $terms as $term ) {…Continue reading

MWM IWP Results Tables

?> MedWeight Individual Weight Program Domain Score Food Environment <td style='–size:; –color:;’> Appetite <td style='–size:; –color:;’> Food Reward <td style='–size:; –color:;’> Sleep <td style='–size:; –color:;’> Physical Activity <td style='–size:; –color:;’> Stress <td style='–size:; –color:;’>   Understanding Your Results Your score…Continue reading