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?
- 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
- 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
- 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]
- Problem in custom meta boxes
- How to show custom field’s value under post/page title in wp-admin
- 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
- 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
- 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
- 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
- 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?
- Send email with custom fields after new draft is saved or new post published
- How do i add custom fields to my themes template file?
- 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]
- 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 query an out put value?
- Check & remove special characters in a field?
- Let’s Create Custom Field Template Documentation
- frontend submit post jQuery clone row won’t save
- Is there a way to set default custom fields when creating a new post?
- Get text from user and display it on page
- Custom Fields Question
- How can I output the custom fields wrapping with HTML
- Custom meta boxes not saving
- How to get all custom fields with some prefix in key?
- Custom metabox not working
- WP-eComerce Advance Meta Tag data in descending order [closed]
- Meta Box Plugin Cloned Fields – Multiple Foreach values
- Stripping and/or altering the content of a custom field (video URL)
- Searching with Multiple (Parallel) Criteria on Custom Fields?
- Save custom field types with this function…?
- Make separate text boxes for separate WordPress Custom Fields
- Custom field bug in WordPress 3.2
- Adding re-type email and check it if the email match
- Counting post fields
- Approach to creating a site with this structure
- Customise Grouped Product display in Woocommerce with custom column
- Custom Form / Search with Custom Post Type Data
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- How would I correctly implement a new if statement in a child functions file?
- How To Show Shortcodes In WordPress Custom Fields?
- Delete custom fields on post publish?
- When post is updated, custom metadata in text area field is overwritten
- Adding custom fields to images
- 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?
- I would like to display different text on different pages
- Meta boxes not displayed, data isn’t being saved
- Calling Custom Field within Function wrapped with Divs.
- Add image custom attribute [closed]
- Check if a field is capitalized?
- How to automatically create a custom field when a post is published?
- Problem display
- Add fields to edit in custom widget
- How to display *block number* instead *date value* on WordPress posts?