[Plugin: Custom Field Suite] No Value Returned
-
I cannot get any values to return using the code provided. Can someone show me a code example that actually pulls custom field data associated with the current page?
For example, I need to echo the value of a select box that associates a single value with every page. So in my template, I have tried several different ways of trying to echo the value associated with the current page:
<?php $loop = new WP_Query(); while ( $loop->have_posts() ) : $loop->the_post(); $field = $cfs->get('pdf_chapter_association'); ?> <h1><?php echo $field; ?></h1> <?php endwhile; wp_reset_query(); ?>
Doesn’t return anything.
Then outside the loop:
<?php $field = $cfs->get('pdf_chapter_association'); ?>
Doesn’t return anything.
What am I doing wrong?
https://www.ads-software.com/extend/plugins/custom-field-suite/
- The topic ‘[Plugin: Custom Field Suite] No Value Returned’ is closed to new replies.