Your question literally doesn’t quite sound like “combining” loops, that’s usually different thing in WP terminology.
Following it literally you already know the part that outputs artist name you want — the_field('artist_name')
.
What probably confuses it in first context is that it’s not really a normal WP loop. Note how that call doesn’t specify which post artist name should be for? That conventionally comes from global post if omitted. You are not setting up post globals at all in your first snippet.
Since the_field()
isn’t even WP function I assume you use one of numerous custom fields frameworks. You will have to consult its documentation how to retrieve the data for a specific post, provided by ID explicitly.
Related Posts:
- Calling Specific Pages with wp query Part II
- Calling custom fields for pages (not posts)
- get_posts that match a user-specified value on a page
- Meta Query returns wrong number of posts
- Delist entries in the_loop
- Loop through incrementing custom fields
- Interrogate a page within a loop to check template type or custom meta data (Pages vs Posts)
- How do delete a meta key?
- Query Posts or Get Posts by custom fields, possible?
- Can I query custom meta data through WP_Query
- Add custom fields to search
- SELECT max(meta_value) FROM wp_postmeta WHERE meta_key=’price’… stops working when value is over 999
- How to add add_meta_box to specific Page Template?
- Meta Query with AND & OR?
- Having different sidebar content for MANY pages?
- Is there a way to do multiple ordering on a multiple meta_query?
- Compare meta_query decimals not working right
- Ordering posts by anniversary using only day and month
- use get_posts to get custom field data, but in one array
- Add input field to ‘Pages > Edit Page’ through functions.php
- How can I query on the year part of a complete date in a custom field?
- How can I combine meta_query queries?
- meta_value_num sort glitch
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- How do I exclude posts by custom field value?
- Echo values from custom field outside loop php
- Sorting posts by custom fields in meta_query
- meta_query for a string inside a meta field containing a comma-separated list
- Order by custom field value not working for acf date field
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- Complex WP_User_Query call fails on production server
- Meta query with timestamp using WP_query
- Orderby custom field meta value ASC and then by date DESC
- How can I show custom fields in the loop only to specific user roles?
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- Accessing loop functions (e.g the_title or the_content) from post ID
- How to Display pages with a Custom Fields in one page
- WP 3.1 meta_query for multiple custom field values
- Get posts with same meta value as current post
- Is there a better way to list all database terms alphabetically?
- How to find a post using XML-RPC without knowing ID
- How to show a post if was published less than two hours ago?
- List users by sum of all their posts’ custom field values
- Change order of posts
- Meta Query And/Or
- get_posts in meta box dropdown not showing latest posts
- Meta query with multiple custom fields for archives page ordering problem
- filter custom field values $min $max
- Custom Fields – How to create a list from multi-line entries of a single value
- Ordering posts by custom field named “date” in backend
- How to pass page as an argument like post in WordPress?
- Get Data From wp_sitemeta for Multisite network
- Unique meta_key with array value vs repeated meta_key with single values
- how to make nsfw post with thumbanil
- Custom Query based on custom field of a single post
- Efficiently sort only certain categories by custom field
- How can I do a variable for meta_query?
- Can I access a post meta field before the loop?
- Displaying page image in the footer automatically
- ORDER BY custom field value out of where clause
- Get post offset/posts page offset in single post page (outside the loop)
- comment meta_query for keys that aren’t yet set
- Show image if author meta (profile fields) exists outside loop
- Can’t query by meta_key
- How can I use custom properties to set different background on different pages?
- ACF: How to get users with a ACF flexible content subfield with a specific value AND layout?
- change order of images attached to post
- ul list with only as many li’s as filled custom fields
- tax query between operator like
- Collect Data from NEXT item while in loop
- Custom field to array?
- Custom field outside the loop and inside an array
- Is it possible to compare the current time with a custom “start” and “end date
- Display metabox title for custom fields with values
- How can I modify my meta_query to work with prices that are stored in the database that contain dollar signs and commas?
- Filter or order based on custom field
- get posts based on non-single metadata
- Woocommerce products search with custom fields
- How to save multiple values with same meta_key, each value linked to another tag id
- How to improve my non-unique metadata MySQL entries?
- WP meta_query args not working in function
- User Filter Options on Archive Page
- Query multiple meta values at the same time :
- Create Shortcode shows only posts with custom_field meta
- get wordpress post loop by meta box date
- Counting number of images from loop
- meta_query ‘compare’ => ‘!=’ not working
- Create custom query for search?
- Filter query based on date in custom field
- Why is wp_list_pages altering $post->ID of the page?
- Getting content from custom fields of different pages on a single page
- Decouple page name from page title
- Checking if field is set before comparing with meta_query in query_posts?
- get_post_custom_values not working
- Display posts where date field matches current month?
- Retrieve IDs from custom field, count and display results differently according to count
- Pagination not displaying correct number of pages
- Filter Query Post by Custom Fields(by date)
- Custom field not showing
- WP Query Args – search by meta_key or title