jarv
08-01-2012, 01:52 PM
hi, I would like to show my custom fields in Wordpress, here is my code:
nothing is getting output to the screen?!
<?php
/*
* Displays the featured banner and title
*
*/
global $cfs;
$list = array();
foreach ( range( 1, 3 ) as $i ) {
if ( $href = $cfs->get('banner_$i') )
$list[] = '<li><a href="'.$cfs->get('link_$i').'"><h2>"'.$cfs->get('bannertitle_$i').'"</h2><span>"'.$cfs->get('bannertext_$i').'"</span><img src="'.$cfs->get('banner_$i').'" width="235" height="176" alt="" /></a></li>';
}
if ( $list )
echo implode($list);
?>
nothing is getting output to the screen?!
<?php
/*
* Displays the featured banner and title
*
*/
global $cfs;
$list = array();
foreach ( range( 1, 3 ) as $i ) {
if ( $href = $cfs->get('banner_$i') )
$list[] = '<li><a href="'.$cfs->get('link_$i').'"><h2>"'.$cfs->get('bannertitle_$i').'"</h2><span>"'.$cfs->get('bannertext_$i').'"</span><img src="'.$cfs->get('banner_$i').'" width="235" height="176" alt="" /></a></li>';
}
if ( $list )
echo implode($list);
?>