WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields - Taxonomy Field add-on
Need Template output example pls (4 posts)

  1. Tommy White
    Member
    Posted 1 year ago #

    I would like to pull in the data assigned to this field. How would I do this by modifying the following example:

    <?php
    
    $values = get_field('field_name');
    if($values)
    {
    	echo '<ul>';
    
    	foreach($values as $value)
    	{
    		echo '<li>' . $value . '</li>';
    	}
    
    	echo '</ul>';
    }
    
    // always good to see exactly what you are working with
    var_dump($values);
    
    ?>

    http://wordpress.org/extend/plugins/advanced-custom-fields-taxonomy-field-add-on/

  2. Goudie
    Member
    Posted 1 year ago #

    I am interested too, I fails to display my data ... Did you finally succeed?

  3. Tommy White
    Member
    Posted 1 year ago #

    I don't even remember posting the above. But here is my working code located in my template file single.php.

    <?php $values = get_field('my_features');
    	if($values)
    		{
    		echo '
    <ul>';
    		foreach($values as $value)
    		{
    		echo '<li class="my_features">' . $value . '';
    		}
    		echo '</ul>
    ';
    		}
    // always good to see exactly what you are working with
    // var_dump($values);
    ?>
  4. Tommy White
    Member
    Posted 1 year ago #

    corrected above post.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.