WCK – Custom Fields and Custom Post Types Creator

Code For single value :
<?php the_cfc_field(‘project-name’, ‘description’); ?>

Code For repeat value :
<?php
foreach( get_cfc_meta( ‘social’ ) as $key => $value ){ ?>
<?php $photo_obj = get_cfc_field( ‘social’,’social-fields’, false, $key ); ?>
<?php $photo_links = get_cfc_field( ‘social’,’social-links’, false, $key ); ?>
<li><a href=”<?php echo $photo_links; ?>” target=”_blank”>
<img src=”<?php echo $photo_obj[‘url’]; ?>” height=”<?php echo $photo_obj[‘height’]; ?>” width=”<?php echo $photo_obj[‘width’]; ?>”/></a></li>
<?php } ?>

Plugins Link : https://wordpress.org/plugins/wck-custom-fields-and-custom-post-types-creator/

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s