display custom fields from custom post type

in order to display custom fields from custom post type when you don’t know the custom field name first use

<?php the_meta(); ?>

to dump out all custom fields as a list

then u can see the filed name and copy it

then u use it with this

<?php echo get_post_meta($post->ID, ‘custom_field_name’, true); ?>

just replace custom_field_name with the field name

happy day

Advertisements

Leave a Reply :)

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s