Updating custom fields with data from the database
Updating custom fields with data from the database
Updating custom fields with data from the database
The issue was the GD was not installed.
Try to grab the output and echo together. <?php $post_objects = get_field(‘field’); if($post_objects!=”) : $value = array(); ?> <?php foreach( $post_objects as $post): ?> <?php setup_postdata($post); ?> <?php $values[] = ‘<a href=”‘. get_permalink() .'”>’. the_title(”,”,false) .'</a>’; ?> <?php endforeach; ?> <?php endif; ?> <?php wp_reset_postdata(); ?> <?php echo join( ‘, ‘, $values); ?>
When you do this: <?php query_posts(‘category_name=<?php the_field(‘cat_1_name’); ?>’,’showposts=5′); ?> The string argument is literally category_name=<?php the_field(‘cat_1_name’); ?>’,’showposts=5. Well, it would be if the string were not also triggering a fatal error. What you have is (assuming I haven’t lost track of the mess): String 1: ‘category_name=<?php the_field(‘cat_1_name’); ?>’,’showposts=5′ An undefined constant: cat_1_name An out of … Read more
Query Posts Via WordPress URL
If it can be explicetly defined as the_title, then this should work for you: $pages = get_pages(array (‘sort_column’ => ‘menu_order’)); foreach ($pages as $page_data) { $fields = get_fields($page_data); if( $fields ) { echo ‘<div class=”the_title”>’ .$fields[‘the_title’] . ‘</div>’; echo ‘<div class=”container”>’; foreach( $fields as $field_name => $value ) { $field = get_field_object($field_name, false, array(‘load_value’ => … Read more
Well i see only two ways either you have to have seprate loop to get best value or you can add ribbon wrapper by using css and absolute positioning of div setting top and left. Though it would be best if you can calculate best value using meta_value_num.
For #1, I think what you’re looking to do is add Custom Post Types and Custom Taxonomies, which isn’t possible via Advanced Custom Fields alone. Custom taxonomies are your own versions of either categories or tags. If you want to use a plugin to create the post types and taxonomies, you could use something like … Read more
Hiding an Advanced Custom Field based on Taxonomy Field selection
Customize TinyMCE Buttons