Nivo Slider and custom fields
-
Hello,
I am trying to make nivo slider to work with Page custom field.I did manage to make it work with Post custom field, but when I use custom field from pages nothing happens.
Here is the code I am using:<?php $postcount = 0; $featured_query = new WP_Query('showposts=1000'); while ($featured_query->have_posts()) : $featured_query->the_post(); $do_not_duplicate[] = get_the_ID(); $postcount++; ?> <?php // get the image filename $value_feat_img = get_post_custom_values("Image"); if (isset($value_feat_img[0])) { ?> <a href="<?php the_permalink() ?>" rel="bookmark"><img src="<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>" /> </a> <?php } ?> <?php endwhile; ?>Do I need to modify something so the custom field from pages work ?
I am new to PHP so it’s hard for me to make it work.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Nivo Slider and custom fields’ is closed to new replies.