$songQuery = new WP_Query('meta_query' => array(
array(
'key' => 'song-id',
'value' => 'song id value here',
'compare' => '='
)
));
You can use above code to query with custom field then use loop to get the contents.
Related Posts:
- How can I sort homepage by a meta value?
- Custom search SQL Query to add custom field in result
- Custom query with orderby meta_value of custom field
- Query Posts or Get Posts by custom fields, possible?
- How to rename a custom field?
- How can I make wp-pagenavi work on a custom query built upon a form submission? [closed]
- Meta Query with AND & OR?
- query_posts and only show results if a custom field is not empty
- Filter archive.php by custom meta
- Order posts by custom field and if custom field is empty return remaining posts
- Query on custom field count?
- How to use query_posts() with a date filter on a custom field?
- Plugin similar to Taxonomy Drill-Down for custom fields?
- meta_value_num sort glitch
- Can ordering post list by meta_value cause performance issue?
- Order by value in serialized custom field
- Author Page Custom Query WHERE author OR [post meta value] OR [post meta value]
- meta query not showing any results?
- Count how many posts have a custom field set
- Upcoming Event: How do I sort database by custom date field, but ignore past dates?
- how can i use custom field in query post
- using multiple meta_key and meta_value in query_posts
- sort search results by custom fields using dropdown
- Query post order by post and desc not working
- Loop to display random posts only if a custom field matches category
- Conditional custom field query
- Order query by meta_value with multiple custom fields
- Display only past events on that page using Visual Composer Grid Bulider
- Custom Field Create Bulk via SQL Query
- Create Pop-Up Box with Custom Field Content Inside the Loop
- Show 1 post and after a specific date show the next one
- query usermeta from custom field
- How to select posts from multiple categories and metavalues?
- meta_compare seems to be treating values as strings instead of integers as expected
- Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
- Order RSS content by an advanced custom field value
- Alter main archive, to show posts with meta as last
- Change order of posts
- Trying to reorder posts by custom field
- Limits, not all post are showen when querying for posts by view count
- Why orderbyb meta_value_num won’t affect the generated SQL Query order?
- filter custom field values $min $max
- query posts custom field calculation value
- WP Query – Is this correct?
- Get post ids sorted by meta_key
- Query_posts with custom field meta value
- querying a custom field
- Unable to get specific value from post meta
- pre_get_posts : only get posts by wp_usermeta value
- Query post by date (stored custom field meta as yyyymmdd) and differentiate across 12 months
- How to query an out put value?
- List custom queried terms in the edit-tags.php?taxonomy page
- Meta_query ‘compare’ => ‘LIKE’ not working?
- Modify date query by URL parameter using pre_get_posts and $_GET
- Loop through incrementing custom fields
- query_posts with meta_value
- How to put forward a blog post
- The best way to collision check in WP
- How can I change the publish date based on a custom field?
- How to exclude custom fields from search queries?
- WP_Query () using taxonomy, custom post types
- How to query for posts with either one or another custom field
- Best way to sort estates and query them (for rent? yes/no. contains office space? yes/no)?
- Custom Query: query by post custom meta data
- Get array of posts based on custom field values
- Get author total post votes from post meta
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- Problem with writting correctly a query posts args in WordPress
- How to query posts by month based on date custom field?
- simple fields plugin custom query
- Custom Field Date Problem
- Compare ACF date field (if exists) and post date and order DESC
- Problem with revisions only returning four results
- Search & column order by meta value in admin
- Dynamically populate query source in Elementor post widget
- searching by keywords in post’s metas or pagination links problem
- select user with all meta field and field value. I am use Below Query for this ,So any of know another way to fast query instead of below query?
- query_posts -> get page_id from custom field
- Create custom query for search?
- query specific posts according their custom fields, using sql SELECT
- Meta_query not filtering posts
- Get multiple posts with some custom fields efficient
- How to add a prefix to existing custom fields over MYSQL query?
- Complex WP_Query Using Post Date And Post Meta
- Checking if field is set before comparing with meta_query in query_posts?
- Filtering posts by WORD in custom field
- How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
- How to check if custom field exists in this widget query
- Only show content slideshow if “slideshow” custom field exists
- Display agents (custom post type) alphabetically, except one who always shows last
- Filter Query Post by Custom Fields(by date)
- How to display search query as formatted text?
- Adding a prefix to a post title
- Why is my Custom Meta Box Field Inputs NOT saving?
- Filter multiple custom fields Values with Check boxes
- Update some (not all) post titles with custom field values before running the Loop
- Arrays in custom fields or is there a better way?
- Setting user permissions per post
- Get custom field from other post in carousel
- Create citation and url in post using 3 custom fields with conditions for each field… So close!