wp_get_current_user() does not return all the data for the user, you should try using get_user_meta(). Try as below
$company = get_user_meta($current_user->ID,'company');
$mf_group = get_user_meta($current_user->ID,'mf_group');
and in your post loop changes this two lines as below
'company' => $company[0],
'mf_group' => $mf_group[0],
Hope this helps.
Related Posts:
- Can wp_query return posts meta in a single request?
- Meta query with string starting like pattern
- compare meta_query in get_posts arguments
- Sorting posts by custom date fields (non standard date format)
- meta_query where value is equal to given value
- Get_post() with meta_key when compare is a date
- querying with custom meta field with meta_query
- Group posts by custom field
- Order by meta_value_num DESC and meta_value ASC on WP 4.0
- SQL query equivalent to WP User Query
- getting posts and number by specific meta value in multiple meta
- How to query using a combination of custom_field values?
- Revolution Slider Orderby Two Custom Fields
- Query two post types and order by two different date fields
- WordPress altering my custom query, How to fix it?
- Order by meta_key in custom post type doesn’t affect the query
- How to show only one post for each categories of taxonomy of custom post that contains a specific custom field
- How can i make WP_Query return post image and categories?
- Query wp_usermeta alongside wp_users
- wp_query with multiple custom fields
- How add a custom posttype name using ACF field to a query post array
- Filtering posts by custom field value not working
- Display link to taxonomy archive only if it has posts with certain custom field values
- Order Posts by meta value AND published date
- wp_query add arguments using array_push if variable met
- Group WP_Query by meta_key date
- How to display specific posts with WP_Query?
- How To Fix WP Query Returns Results But Shouldn’t?
- Add quicklink to in the Admin posts page where I can query by a meta_key
- Display custom field meta outside loop, site wide
- Meta_query with multiple keys and multiple values
- Orderby is working with one query but not with other
- Meta_query on same meta key, with diffrenct values
- Extend product search with meta in WooCommerce
- how to make members list directory through wordpress post custom meta key.
- Order by empty custom field
- Query posts without meta preload
- Adding multiple meta_key fields as orderby options to a WP Query via a function
- meta_value_num not ordering all items
- WP Group posts by year(desc) > month(desc) > date(asc)
- wp_query get data from advanced custom field in wordpress
- How to compare a date in custom field with today’s date in custom WP_Query?
- WP User Query with Custom Fields and Search Results
- WP_Query Meta_key is text value and need to sort as numeric not working
- filter wp_query result with custom field values
- Order post type by sum of two custom fields
- Reduce number of SQL queries inside WP_Query loop to fetch author data
- WP ForLoop to compare meta information of posts to determine what post to display
- Display posts with specific value first in query
- get_posts custom field
- wp_query posts with custom fields number smaller than
- Retrieve select tag custom values from array and display them in current page with wp_query?
- How to use a dropdown to filter posts by custom field
- Order WP_Query results by meta key value in custom query
- Query only displays one page_id
- query post by author gender
- Querying a large number of posts including their custom fields data
- add_query_arg to compare and display events from a certain date
- Query multiple post types, but different order for each
- Order by the first array within a meta_query
- Query ACF relationship field – Comparator IN – Value array
- How to _GET multiple value checkbox WP_Query in Custom Toxonomy / Custom Fields
- How do i create a custom post query when the meta value is an array?
- How to add a “base” filter for all posts visible to visitors on the site?
- display ACF repater field in archive page
- How to use the Term Object from a custom select field in a query
- WP Query – grouping posts by same meta key, adding together values from another key
- Retrieve all custom field values of a specific custom field metakey as an array, inside WP_Query
- meta_query is overriding default search
- Categories In English version showing not canonical URL, instead shows query search result
- How to do WP_User_Query for Nested Array value Inside Nested Array field
- Comparing Meta Field date in WPQuery using Meta_Query?
- Query against multiple locations within single custom post type post
- Unusual high query of user meta data
- WP_Query, ACF field and array
- Order 2 meta_queries differently in WP_Query?
- Order by Date Custom Field
- Sort posts on custom field AND after that sort on date?
- Order posts by title and custom field value?
- Best way to query posts and order by relevancy to query
- List users by Year of Birth using a foreach loop to dynamically populate years and data
- Meta key in wp_query bug?
- Wrap group of wp query posts to parent div by date/year
- Using custom field as ‘orderby’ value causing post grouping by publish date
- Sorting posts by meta values: 2 different orders
- Order Custom Field by Price
- WP_Query within save_post doesn’t include the item that triggered the action?
- WP_Query to show post from a category OR custom field – Not 100% answered
- Sorting Posts with meta value not working
- Order by three custom fields (Y-m-d), then separate into yearly sections
- How do I display posts with specific value in a custom field into my loop?
- How ‘secure’ are loops?
- Get posts by meta value except one post [closed]
- WP_Query – order with usort by custom meta
- Best performance for use Custom Field in WP
- WP_Query sort by ACF date field (newest first) with blank dates first
- How to include custom fields in wordpress search
- Extend search query to search meta keys values based on search string
- Group users by meta field, with name of meta field as group title
- How to get products with the same custom attribute like ean code