Definitely doable with tons of different ways to accomplish it. Basically, you can use a widget that allows for the execution of PHP or modify your theme files to execute PHP in the sidebar. The main function you will need is get_post_meta
. You also need to access the post/page/CPT ID. You can use code like the following to get your post meta displayed.
global $wp_query;
if(is_object($wp_query->queried_object) && $wp_query->queried_object->ID)
{
echo get_post_meta($wp_query->queried_object->ID, 'my_post_meta_key', true);
}
Obviously, you need to change the “my_post_meta_key” value to a key that corresponds to the meta data that you want. Also, there are other ways to access the current page/post/CPT ID, but since I do not know your specific context, this will work for most situations.
Related Posts:
- Individual Widgets per Page
- Having different sidebar content for MANY pages?
- Is there a way to dump all registered sidebar/widget?
- Add class from custom field into widget class
- Custom Post Type Data in Sidebar widgets?
- Custom per-page sidebar widgets .. possible?
- Add multiple images to a page sidebar
- Best way to allow manageable social media URLS?
- How do you create dynamic customised sections in WordPress?
- Creating a custom menu/widget area
- Creating a widget with a number of custom fields
- Random image from tag/custom type on sidebar
- How to display image inside container of custom made widget
- Want to make A CSS if meta key value is empty
- how to display a widget only on a page where the custom field is defined?
- How Do I Display A Custom Field In The Sidebar Of All My Pages?
- What’s the best way to implement custom widgets on a per post basis?
- Display custom widget value in header.php
- Add custom data (field) to sidebar widgets for later display
- Custom field outside the loop and inside an array
- custom filed from post in the side bar
- WP_query returns error when used for custom widget
- Running a Gallery Shortcode in a Custom Fields Widget
- What method should I use for a sidebar widget that reads latest posts?
- I would like to display different text on different pages
- How to check if custom field exists in this widget query
- Add fields to edit in custom widget
- Custom field in external Javascript
- wp_register_sidebar_widget in loop within a plugin?
- Add capability for editors to modify custom fields
- if is within sidebar [duplicate]
- Creating a Playlist of Widgets
- Order a query by meta_value and then by post_date
- custom select field populated by allocated post category
- custom field functionality
- How to display only some widgets of a sidebar?
- Displaying database table in backend of wordpress
- How to add custom_fields value in JSON API using create_post
- wordpress simple post multi rating with post_meta and user_meta
- Media Attachment Custom Meta Fields not saving in Media Uploader when using jQuery UI Autocomplete
- How to filter post using custom feild value in shortest and longest duration?
- Custom fields are not displaying in page with multiple loops
- Inkness theme sidebar
- Custom Field select list is truncated
- Query Posts Via WordPress URL
- how to call new widgets in sidebar in custom theme?
- CSS conditional on custom field value
- Template from scratch: Sidebars not showing widget
- How to add an option to admin to add image that could be used as header?
- WP Query multiple select form – meta_query help
- wp_postmeta are updated for only one page
- update_post_meta not working in action hook
- My meta boxes update wp_postmeta of posts but not of pages. What is wrong with the code?
- How can I get the sidebar id on the current page?
- Confusion on how to display custom field data
- how to show this part only in the single post page?
- Meta Box Data added to header redirect
- Edit different parts of a page seperately
- How to use page metadata while using wp_list_pages()?
- Validating custom meta boxes with jQuery results in posts being saved as draft instead of published post
- Custom Field: Display only if a specific key is selected outside the loop
- Custom field value link title
- How to Order Posts by Custom Fields?
- Show or hide lang=”ur” in main element
- How to use a custom field for search engine optimization
- How can I create more “create attachment” custom field – any idea?
- Copy url from post_content to custom field
- Fetch data from a WP page with same name as current username
- Getting content from custom fields of different pages on a single page
- How to Pull Out Twitter Summary Data in other areas of my template?
- Custom Fields – How can I remove the publish option for certain users
- My custom widget won’t stay in the widget area after I refresh the widget page
- Analyze uploaded images to get colour values
- Can i categorise my meta box?
- Turn Current Date in Custom Field Ouput Green or Red
- Help sorting by Meta Key value
- How to keep sharing stats after creating 301 redirects?
- Change event firing in wordpress
- Custom classes for attachments
- How to overwrite a value for a custom field?
- query specific posts according their custom fields, using sql SELECT
- Filter CPT based on meta box value using Flexible Posts widget?
- WordPress archives by custom field and date
- Meta_query not filtering posts
- Automatically hide Widgets that would lengthen page
- Using Hooks. Thematic
- Decouple page name from page title
- Adding thumbnails for non-image attachments
- Download stuff after filling fields?
- Show message if statement is false – foreach
- Custom Field add markup to line breaks
- Load code for custom fields only on admin pages?
- Order by custom field in query multiple
- Returning website screenshot based on Custom Field
- WP Post Meta Box Field Not Showing Updated Field
- Custom field in a shortcode?
- WP_Query based on multiple metadata comparisons
- Metabox nonce not allowing update
- Get multiple posts with some custom fields efficient
- same custom field for single posts