background
is not a Core meta field. Since you say that get_post_meta( '22', 'background', true );
returns an image ID, I can only assume that whatever saved that value saved the image ID and not the filename.
You can convert the filename to an URL with wp_get_attachment_url()
or get other information including a partial file name with wp_get_attachment_metadata()
Related Posts:
- How do I remove all the metaboxes for a custom post type?
- Get all posts from custom post type and insert in select input as metabox
- Detect meta value changes when post is updated (post_updated)
- Having trouble with custom post type / meta box
- How can I include meta box content when searching?
- update a post meta from a single table cell TablePress
- update custom post type meta from a shortcode
- Custom Meta Boxes – Nonce Issue – Move to trash issue
- Displaying Meta Box Image
- How to keep a check box in custom meta box for custom post type checked by default for add new post?
- How to add multiple featured image in meta box in post editor?
- Show metabox in custom-post-template depending on taxonomy term?
- Formatting custom meta box date from YYYY/MM/DD to a more readable alternative
- Displaying custom posts only if custom meta box’s date is not expired
- Displaying Metabox value (custom post type taxonomy)
- How can I display my custom metaboxes on a custom post template?
- Meta Box Only in CPT Edit Page, Not in Add New
- Populate Custom Fields in a Custom Post Type?
- Custom meta box data array: foreach not working correctly?
- Undefined Variable – Custom Post Type Meta
- Populate dropdown from one custom post type inside another custom post type
- How to check if user meta field is empty in conditional else statement
- A better way to add a meta box to custom post types
- Metabox not show in categories custom post type cmb2
- Show Custom Post Type meta boxes only on Page Edit
- Can’t publish custom post type – “You are not allowed to edit this post.”
- Meta Data for Custom Post Type not saving
- create custom meta box with default value
- Displaying a div from an assigned meta_value when on a page
- How to Echo Metadata Value in Currency Format
- Issue on Working with Metabox – Checkbox to enable Sale Items
- Why do I have to press the “Update” button twice to save my meta box values?
- Values from meta-box not on $_POST
- Custom post type suddenly stoped working after WordPress 5 update
- How can I output WPAlchemy repeating fields meta values in my page template?
- Meta box data is saved but NOT displayed in the meta box text field. Why?
- Save Metabox Custom Field Value
- Meta box data not saving
- WP_Meta_Query object with conditionals
- Related posts meta_query CPT
- Meta box with front-end styling
- Sanitaizing Select Optin For Custom Post Type Metabox in WP
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Cannot Save MetaBox Data in Custom Post Type
- Add a class to post_class if more than one post shares same meta_value_num
- Function to return values from metabox
- Add a meta field to the list of results for a custom post type
- Empty meta-box returns publishdate if no value is set?
- Custom Meta Box with variable number of fields
- Custom Post Type meta data getting deleted on bulk editing taxonomies
- Get meta values from parent post and save in child post
- Metaboxes in Loop
- Custom meta box data not saving
- Collect custom post in a calendar
- Delete custom post type metadata without deleting the post in admin area
- Problem with ‘save_post’ hook not running
- Edit post meta direct from post.php?
- Howto: use existing post_meta as options for a different metabox (checkboxes or list)
- Display a post count from a custom metabox selection
- Post AND page parameter for WP function
- Use a Variable in update_post_meta as the $meta_key
- Custom Taxonomy as checkbox or dropdown
- Why won’t my metabox data save?
- echo value from ‘select’ field type into page template using cmb2?
- Add metabox with media uploader in a custom post type [duplicate]
- Post metadata deletes itself
- Best way to arrange custom post types by Attributes -> Order metabox value?
- Possible to add meta box to edit.php pages?
- Automatically adding meta data to posts or multiple query help
- Trigger “unsaved changes” dialog for custom post meta changes
- Conditionally Query Custom Post Types by Post Meta for Blog Home Page?
- Create a random unique 6 digit number as custom field for custom post type
- Using My-Meta-Box-Class plugin, how is ‘Date’ value stored?
- What is the best way to correlate one-to-many content-type relationships?
- Visual editor issue by having multiple tiny mce editors in a CPT
- Meta Query Filtering not working on Custom Meta Box using Radio Buttons
- post meta parameter in post custom-post-type endpoint with restapi
- Custom filter function not working with Custom post type
- Importing Data from a Non-WordPress database, into WP
- Meta-Boxes for CustomPostType cause PHP Errors and Notices in “Add New” view
- custom post type metaboxes not saving
- Custom post type, have only my meta boxes
- Display Repeatable Meta Box Content
- Reusable metabox backend and frontend
- How can I modify a custom post type and custom page template for a child theme if all content seams to be handled by theme’s ‘native’ plugin?
- How can I get some of a posts meta data whilst it is still inserting?
- How to order custom posts by one of the custom fields value, ‘date’?
- How to create review point system for CPTs (many-to-many relationship)
- SELECT custom post type and its meta in SQL
- Show a custom post title in another custom post type in Meta box
- Custom taxonomy with custom post type archive page
- Saving Child Terms on front end not setting parent
- Wrong post ID in meta box callback
- update a posts of other custom post type
- How do I extract the contents of a CPT’s custom field for all posts?
- Select custom post by meta value
- Custom post type – permalink
- WP_Query arguments: Loop through custom post type – get all entries except excluded meta_key?
- How to query custom post then display sections by meta value
- Changing to different post type maintains the redirection?