...

View Full Version : showing wordpress custom fields in php



jarv
08-01-2012, 02: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);

?>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum