get_queried_object_ID()
will return the ID on the page for posts, or get_queried_object()
will return the page object containing all its post fields.
Alternately, the ID of the blog page is stored in the option page_for_posts
, which is internally how get_queried_object
gets the ID of the post object to load.
Related Posts:
- What is the index [0] for on post meta fields?
- Custom field metabox not showing in back-end
- How to hide meta box values from custom fields list?
- Create meta boxes that don’t show in custom fields
- Custom fields to save multiple values
- wp_handle_upload error “Specified file failed upload test” but still creates attachment?
- Create Multiple File Upload Metabox in WordPress
- Limit the number of acf content when displaying in post loop [closed]
- Button inside Custom Meta Box triggering the Update Button
- Why is my Custom Meta Box Field Inputs NOT saving?
- custom-meta-box checkboxes from loop won’t save
- get_posts in meta box dropdown not showing latest posts
- How can you include custom post meta in search without calling each key?
- Display Custom Meta Box Field Only If Value is Present
- shortcode in a custom metabox
- Can I access a post meta field before the loop?
- Problem with saving large amount of data in postmeta/usermeta
- Move Title and the Content WYSIWYG editor position
- How to validate select field in post meta?
- How to use media upload on metabox post page without breaking TinyMCE?
- Let’s Create Custom Field Template Documentation
- How add multiple wp_editor_box to new post
- Can I save post meta programatically without setting metaboxes?
- Meta box values are displayed on Custom Fields list. Is it possible to hide them?
- If metabox has content display content
- put saved metabox values back into fields and then display on the front end
- Display metabox title for custom fields with values
- How to improve my non-unique metadata MySQL entries?
- Set class if a meta value is set within post archive
- WordPress Blocks, setAttributes not saving
- Allow HTML in Custom Metabox area
- Custom field metabox not showing in back-end
- Save, update, get and sanitize post meta as HTML not plain
- get wordpress post loop by meta box date
- Create Meta boxes dynamically
- Metabox value for post loop?
- Can’t save meta field value if the title not set
- Display Data From This Custom Media Upload Meta Box?
- When post is updated, custom metadata in text area field is overwritten
- wp_postmeta are updated for only one page
- I want my post to republish again after adding a custom field
- When editing a post with a custom meta box the values aren’t displaying correctly
- Order by a meta field in query loop
- How to add new Metadata options (Date, Author, etc.) for Posts?
- Saving multiple custom meta box fields
- ‘Preview Changes’ for custom meta boxes?
- Using TinyMce with textareas in meta boxes on custom post types
- add meta box – custom field : which to choose?
- Add metabox to document tab in gutenberg
- When using add_post_meta and update_post_meta, is there any way to give the individual arrays keys?
- Storing meta fields multiple times OR once with multi dimensional array?
- Add custom option to Standard Page Attributes Meta Box
- Only show metabox when date-value in other metabox is over?
- Is it possible to store arrays in a custom field?
- importing data from non-wordpress mysql db
- How To Create a Metabox of HTML Content with Instructions For Editors When Editing a Post or Page?
- wp_editor in add_meta_boxes does not show gallery
- Calling Specific Pages with wp query Part II
- Copying Custom Meta Values from existing post to a duplicate post
- Order posts according to user defined order for meta values?
- My metabox class
- Loading scripts to the Post Edit page only
- Calling custom fields for pages (not posts)
- Get specific custom field keys from a post and put into an array
- How to check for specific meta box value on front end and output accordingly
- Loop to display random posts only if a custom field matches category
- Users Select inside custom metabox
- filtering custom post types via meta data drop down
- If meta key exists in get posts function otherwise create it
- Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?
- How do I Implement Atomic Update of Post Metadata?
- How do I have WP_Query match posts based on search parameter OR meta fields? (rather than search parameters AND meta fields)?
- Get updated meta value after post update or published (custom post type) using hook
- Get registered custom fields or post meta even if empty
- New WP_Query loop in admin causes problems
- Outputing a metabox textarea and avoid line breaks inside li tags
- How to I retrieve the ID from the Posts page?
- create custom meta box with default value
- How to get posts with a metadata numeric key greater than X?
- Custom meta boxes not saving
- Get meta field value of all catgories
- Add a class to post_class if more than one post shares same meta_value_num
- Footnotes in custom fields
- Display Meta Data with HTML?
- How to store meta field values
- Group Posts By Custom Meta Value: Date
- Meta field bulk editing no longer working in WP 6.0 [closed]
- get_field values for each post on home page using wp_add_inline_style
- Adding Facebook’s image and meta description retrieval capabilities to a WordPress post
- Metabox/Custom fields are not saving input data
- Is it possible to sort the post based on a custom field?
- Update custom table on metabox POST
- how to modify a field’s size in a metabox : ROWS height, and scroll control?
- Saved Post Meta Array Returns as String
- Problem saving meta data
- Custom Metaboxes, multiple post selection
- Filtering posts by WORD in custom field
- Display custom field value into content with hyperlink
- save all acf options in one meta_value [closed]
- WP Query Args – search by meta_key or title