I’m not sure why get_post_field
wouldn’t work in this situation, but if you can access $post->ID
, you should also be able to get $post->post_title
and $post->post_content
(and even $post->post_excerpt
if it’s there).
The $post object includes the standard metadata, like author and publication date. Any metadata in the wp_postmeta
table in the database can only be found with $post->ID
, with which you should be able to get your metadata using get_metadata
. Failing that you can always run a query on the database directly. Since plugins have quite some freedom in structuring their metadata it’s not possible in general to say how to structure this query. Also: read Otto’s note on this.
Related Posts:
- Setting post meta data to random value during post status transition / on publish
- How to check if post meta key exists or not in wordpress database
- How to add category to: ‘wp-admin/post-new.php’?
- How to Display a List of Users Who Have Made at Least 1 Post?
- How can I retrieve multiple get_post_meta values efficiently?
- Code to make a post sticky
- Let private posts stay in status “private” after edit through “editors”
- How to allow hidden custom fields to be added from wp-admin/post.php?
- Export WordPress Posts and Meta Information in CSV format
- Delete duplicated wp_postmeta record
- Will a large postmeta table slow a site down?
- Update all posts automatically when using post_meta
- How to batch update post content with custom post meta value
- Change slug with custom field
- Better post meta efficiency?
- featuring old articles without messing up with the archive
- Edit meta data does’t work with custom sql
- How to change post status from publish to draft using hook in wordpress?
- Hiding by default specific post status on backend list?
- Human Time Diff, change mins to minutes
- Enable commenting on front-end preview page for pending posts
- Change post format using custom field
- Does WP get all post_meta on POST page?
- Custom Post Status Posts viewable to the public
- Sanitizing `wp_editor();` Values for Database, Edit, and Display
- Exporting Data from WordPress into a flat table
- Adding Multiple Values to a Post Meta Key
- Using radio button meta data from a custom meta box
- How can a guest view the “Pending Review” Post?
- How do I batch create revisions of all posts?
- add filter to “quick edit menu” in wordpress admin
- ‘transition_post_status’ only fires when pressing “Add New”
- PHP Notice error (when on 404 page)
- What Is meta_id In wp_postmeta?
- What differences are there between a Privately Published post and a Draft post?
- Checking if a post with certain meta value exists
- How to permanently delete a post meta entry?
- Add custom field automatically (add_post_meta) with value based on number of words of article
- How to generate numbers indistinguishable for the IDs of the posts
- Modify WP_Post before processing
- Save re-arranged draggable post items to wordpress database
- Update post status from “publish” to “trash” for half of posts
- I would like to give special promotion for the first 100 posts in my blog? Can anyone tell me how to do that?
- Change post_date to post_modified date on post template?
- How can I set a Post’s default visibility to private and pending review checked
- Converting a dynamic piece of code using WordPress Loop into a static one using Post ID
- how to remove dash (-) post status from post title on posts listing page wordpress
- Email Post Attachment on wp_insert_post Action
- How can I sort posts by the date and a custom meta field?
- is there a way to show the the post title after the image?
- Get Meta Key Value While Saving Post
- How to change post status from frontend?
- Force the “Choose from the most used tags” meta box section to always be expanded
- Update postmeta Parent when post_status child change
- Meta value does not save for scheduled posts
- Custom Posts Query and meta_query Sort Order
- Posts and Attachments with “Published” status in Search
- How to compare two posts including their meta fields on a scalable base?
- Getting value from get_post_custom
- Calling Different Custom Post Timestamps in a table
- Admin – create custom post status and display above table
- Is it possible to paste a link without tags and make it directly a link in a post?
- Restrict edit, but allow preview for custom post status
- WordPress capabilities on pending post status
- Cannot retrieve a custom RSS field from posts
- Saving custom fields to a custom taxonomy
- How to automate featured posts number? [duplicate]
- why there are so many posts whoes post_type is revision? will these records waste too much database space?
- Customize rel=canonical tag for single blog post
- Change all author links in Blog roll
- How to I retrieve the ID from the Posts page?
- $post->post_type not working
- How to save meta checkbox WordPress
- how can i allow users to view their own pending posts in a front-end page
- How to calculate the average of a post meta value(Numeric) of a specific author
- Is there any way to tell when wp_postmeta has been updated?
- wpColorPicker – problem with implementation to post meta
- Change post author without using wp_update_post()
- if in category but only with post meta
- wp_query with ajax
- Update post meta within save_post action
- Display post number by category
- Updating post meta for checkbox
- Saving Post Data in Another Database
- Custom permalink for each post
- How can I tell if a post has been published at least once?
- Automatic blog page with custom design [closed]
- Add multiple meta keys to a post at once
- Show number of posts by logged in user
- How does WP decide how to display a page
- What function publishes a post when you click the publish button?
- When sending a newsletter -not with wordpress- the server has 100% cpu [closed]
- Retrieve data from post meta meta_key having ‘_product_fq_image’ while having author_id and post type is PRODUCT
- Insert data from custom created PHP page into wp_postmeta table
- Post Status Frontend Announcement
- Adding a meta box to determine the sidebar [closed]
- The loop starting at a certain ID
- Display amount of pending posts in back/front end
- saving/reading custom field value does not work – no value gets POSTed
- Simple Custom Metabox Not Saving