Try changing $meta['title']
to $meta['title'][0]
& the same thing for $meta['track']
. change it to $meta['track'][0]
UPDATE:
I looked at the code more deeply and you basically need a foreach loop.
Here’s the final code should look like:
<?php
$args = array(
'post_type' => 'page'
);
$repeat_loop = new WP_Query( $args ); if ( $repeat_loop->have_posts() ) : while ( $repeat_loop->have_posts() ) : $repeat_loop->the_post();
$meta = get_post_meta( $post->ID, 'songs', true ); ?>
<?php
foreach ($meta as $key => $value) {
echo $value['title']; ?><?php echo $value['track'];
}
?>
<?php endwhile;
endif;
wp_reset_postdata();
?>
Thanks
Related Posts:
- Use WP_query to match post types based on custom field values
- WordPress custom post type
- Query all posts where a meta key does not exist
- what is the correct way to compare dates in a WP query_posts meta_query
- Meta query with boolean true/false value
- Get post with multiple meta keys and value
- Custom post type archive 404’s with paginate_links
- Display Custom Post Type Fields
- Retrieving 3 latest post from each of 5 different custom post types
- how to group custom post type posts by custom taxonomy terms
- Using Query Posts With Multiple Post Types And A Taxonomy
- How to get the parent’s taxonomy?
- How Do I Use WP_Query to Run This Database Query as Search Result?
- Can’t sort order of wp_query with 2 meta keys
- Query for posts from any post type but only add instock products
- Query not returning CPT posts
- Unable to display multiple post types in same query (WPML WP_Query)
- Query for posts in 2 taxonomies
- Quickest way to get last or oldest post date – WP Query
- Conditionally Query Custom Post Types by Post Meta for Blog Home Page?
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Custom query shows custom post types in trash
- Multiple post type queries (with specific arguments for each)
- WordPress Orderby Numeric Value Not Working
- Sorting multiple custom post types without a meta key/value pair by sort order
- orderby in custom WP Query does not work
- Query/list all terms and their custom post count
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Get posts between custom dates
- Get latest 3 posts from multiple CPT in one query
- Polylang non-default language ignores tags in WP_Query
- WordPress request fiter order by related post’s post_title
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Different Ways to Query Custom Post Types?
- pagination not working for category.php (custom post types in categories)
- How to display Related Posts based on number of taxonomy terms matched
- Filter date from post meta when date is in string format
- How to make WP_Query not to show irrelevant posts?
- Loop for custom post types filtered by a taxonomy
- Displaying a div from an assigned meta_value when on a page
- How to get specific post meta by title or id
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Pagination not working on custom query on a page
- find custom post type post by searching its custom field with my string
- FacetWP paging custom wp_query
- $post->post_meta not pulling any post in wordpress/php
- WP_Query of custom post type sorted by meta_key has unexpected results
- Returning a custom content types with meta values
- Can’t change posts per page in WordPress Post Type Query
- postsperpage value not being applied
- WP_Meta_Query object with conditionals
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- HM CMB: Post Select Field for CPT ID
- Custom Post Type Query W/Category Dropdown
- Find Posts based on Child Post value
- Custom Post Type ‘Event’: Chronological list of recurring events from meta_values in array
- Sorting the Loop by Taxonomy Value
- Custom Query: Multiple CPTs and a taxonomy filter
- WP query_posts group by meta field related
- Custom wp-query display post only today
- After inserting new post with wp_insert_post() the post is not visble to WP_Query, but the same WP_Query works for post inserted from wp-admin panel
- custom post type and a “sticky” position taxonomy
- How to sort by multiple values in a nested WP_Query
- Custom meta fields not showing up in WP_Response Object via custom endpoint
- How to get post by meta value
- How do I get all authors posts of a custom post type outside loop
- minimize wp_query call to database
- Linking posts together with Advanced Custom Fields “both ways”
- Query the title of the page to show posts with matching category in the loop
- update a posts of other custom post type
- How to get Current week and current date record wp query
- How to get post meta for custom post type and taxonomy
- get_post_meta for Custom Post Type ( CPT )
- Main site single-property.php design, as homepage of a multisite
- Imported Content Doesnt Show Up On Frontend
- display news with pictures 3 small and one large (loop)
- Custom Post Type meta oembed html output resulting in WSoD
- Values inside a custom field to determine which category posts to display
- Custom Query With Multiple Meta Key Value
- Custom post type blog pagination conflict
- Query Posts From Multiple Post Types
- Return only custom post types for the page, not all
- send user to first page of results when reposting to page?
- Querying meta values within an array
- How do I correctly query posts from a post ID?
- How to exclude certain portfolios from a loop
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Display ACF object field data using Elementor Custom Query
- Assign a tag to custom post type using a query
- How to query different post types in specific order?
- Retrieve custom post types by custom taxonomies with WP_Query
- Custom taxonomy wp_query woes.
- Count custom post type based on two meta data
- Different options per post type in WP_Query
- Custom Post type loop with ACF not displaying properly
- Display the current post in browser as the first post in a loop (for a slideshow)
- custom taxonomy pagination 404 error
- Order by post meta value gets random results
- Trying to set up a range filter for related custom post types
- Dynamically count the number of custom post types associated to a custom taxonomy