1

Use the following code to add new column and show data properly. function add_user_columns_hospital( $column ) { $column['hospital'] = 'Hospital'; return $column; } add_filter( 'manage_users_columns', 'add_user_columns_hospital' ); function modify_user_table_row_hospital( $val, $column_name, $user_id ) { switch ($column_name) { case '...


1

Add this code to your functions.php this will add an extra column to the listing table with Product name. Like 1 x Netflix Premium. If multiple that will be visible too. add_filter('manage_edit-shop_order_columns', '_order_items_column' ); function _order_items_column( $order_columns ) { $order_columns['order_products'] = "Product Name"; ...


1

You will need to use get_the_terms() to get the taxonomy terms associated with the post and loop through them until you find one that has an image set: $post. = get_queried_object(); $terms. = get_the_terms( $post, 'taxonomy_name_here' ); $image_url = null; if ( $terms && ! is_wp_error( $terms ) ) { foreach ( $terms as $term ) { $...


1

I have this problem as well, @tony-djukic. I have an administrator user that can see two posts of a custom post type. I have two subscriber users, each are able to only see the opposite post as the other. Here's what I'm using to (apparently not) get all the posts: get_posts(array( 'numberposts' => -1, 'post_type' => 'my-cpt', '...


1

I had a similar issue but couldn't solved with the snippets on this thread. I had to order a query by: all 'featured' posts first (is_it_a_featured_etf) and by a numeric field (etf_aum) in DESC order after the featured ones. My solution: 'meta_query' => [ 'relation' => 'OR', 'etf_aum' => array( 'key' => 'etf_aum', 'type'...


Only top voted, non community-wiki answers of a minimum length are eligible