There is no WordPress function called meta()
. Try using get_post_custom()
(Codex ref) instead. For example:
//Address
add_action( 'woo_post_inside_before', 'my_address' );
function my_address() {
if ( is_single() && in_category('listings') ) {
global $post;
$meta = get_post_custom();
echo '<h1>' . $meta['address'] . '</h1>';
}
}
Note: I’m not sure you need to call global $post;
in this context?
EDIT: updated to add HTML tags.
Related Posts:
- How to filter post listing (in WP dashboard posts listing) using a custom field (search functionality)?
- Add validation and error handling when saving custom fields?
- Validating Custom Meta Box Values & Required Fields
- Is there a way to set default custom fields when creating a post?
- Add custom objects/entities to WordPress
- Adding another state (spam, reject, approve) to wordpress comments?
- WP doesn’t show Array Custom Fields?
- Add new “Insert Into Post” button with another function
- Edit Custom Database Tables in WordPress
- Filter results with custom field values and dropdown
- Meta keywords and descriptions plugin for manually editing meta for each page/post
- Add meta data to the menu
- Making a configurable field translatable
- Is there a way to do multiple ordering on a multiple meta_query?
- Check before publishing, if already exist post with current custom field value
- can you set a default value to a custom field
- How to customize default wordpress editor?
- Guest Author – How can I use custom fields to create guest author link?
- post meta data clearing on autosave
- Custom Fields Bulk Edit
- Custom Page Template [closed]
- How to make custom comment fields required and message field not required
- Problem in custom meta boxes
- How to show custom field’s value under post/page title in wp-admin
- Multiplile values checkbox or select in custom meta box
- Adding Properties to User Profile and Displaying in List
- ajax delete value from custom field array
- How do I read the value of a custom field of the page?
- Add input field to ‘Pages > Edit Page’ through functions.php
- Auto-add paragraphs to custom field?
- Add description text under input field for new profile fields
- How to add a predefined custom field without using a plugin?
- how to save multiple custom fields for a post in one go?
- get_post_meta in sitewide tags plugin fails to return value for custom fields
- Best way to add custom / magic / flutter fields into RSS feed
- Populate Custom Field Dropdown on Theme Install?
- Insert attachment ID in custom field from media uploader
- Customizer field value into functions.php variable
- How do you create dynamic customised sections in WordPress?
- How to add content at the end of posts?
- Delete all custom fields at once?
- Buddypress Add unserialized Profile Fields in Members Loop [closed]
- how to put a custom field value in variable
- Auto Populate Custom Field with Complex Value That Increase by One?
- Custom Metabox Not Saving
- Better Method for Multiple Meta Boxes
- Getting the ID of any image for use in functions.php
- Auto-remove custom field with no value on publish
- query usermeta from custom field
- custom avatar removal
- Displaying a checkbox array from advanced custom field
- WP 3.1 meta_query for multiple custom field values
- How to make condition, based on custom fields value?
- How to select posts from multiple categories and metavalues?
- Display custom field values from posts on frontpage
- Sort custom field by post
- Send email with custom fields after new draft is saved or new post published
- Cannot save CPT meta box
- How do i add custom fields to my themes template file?
- Custom tables or custom fields?
- Post selector as Custom Field
- I need a “Choose from existing content” popin
- For homepage images (for small business website), is it better to use custom fields or post_thumbnail?
- Redirect to another page using contact form 7? [closed]
- Specific coditional usage [closed]
- Custom Behavior when Adding New Custom Post Type in Dashboard
- How to remove custom fields from the selector?
- How can I hide custom field from users used for caching response from external api?
- Hide custom fields when empty
- How to disable Edit Post and Allow only Custom Field?
- How To Show Shortcodes In WordPress Custom Fields?
- Save input form on custom field
- Delete custom fields on post publish?
- When post is updated, custom metadata in text area field is overwritten
- Adding custom fields to images
- Is it possible in WordPress
- Extend WP_Customize_Control with Multiple Field Control
- custom field functionality
- Custom fields are not displaying in page with multiple loops
- How to add an option to admin to add image that could be used as header?
- Show or hide lang=”ur” in main element
- How can I create more “create attachment” custom field – any idea?
- Using Hooks. Thematic
- Adding thumbnails for non-image attachments
- Custom field in a shortcode?
- How to add a prefix to existing custom fields over MYSQL query?
- I would like to display different text on different pages
- Meta boxes not displayed, data isn’t being saved
- Semi-Private Comments + page comments -> is it possible?
- Calling Custom Field within Function wrapped with Divs.
- Get fields from metabox array
- Including inline Custom Fields info with add_filter in functions.php
- Add image custom attribute [closed]
- Check if a field is capitalized?
- How I can change PayPal IPN ‘custom’ field in woocommerce?
- How to automatically create a custom field when a post is published?
- Problem display
- Google not index my Custom 404 page ?why?
- Add fields to edit in custom widget
- How to display *block number* instead *date value* on WordPress posts?