Is there a way to export Advanced Custom Fields data?
Is there a way to export Advanced Custom Fields data?
Is there a way to export Advanced Custom Fields data?
You can use php values inside the do_shortcode function In your case it will be like this: <?php echo do_shortcode( ‘[contact-form-7 id=”983″ title=”Formulaire de contact 1″ destination-email=”‘.get_field( ’email’ ).'”]’ ); ?>
As mentioned in the comments you an issue in your meta query, as you set the key to 20161126 or similar. Instead key should be filled with your meta key post_end_date. Meta query also support multiple arrays to combine your query to also include posts where the meta key is not set. The example would … Read more
Maybe this can help $videoID = the_field(‘video_link’); $jsonurl=”http://vimeo.com/api/v2/video/”.$videoID.’.json’; $json = file_get_contents($jsonurl,0,null,null); $json_output = json_decode($json,true); echo ‘<img src=”‘. $json_output[0][‘thumbnail_large’] .'” />’; It’s the same call using json method
The problem appears to be, per the string of comments in the question, that the activiteit_verslag key is set for many, or all posts, even if the value is empty/NULL. EXISTS only checks the presence of the key. The value is not considered, so too much is returned. There are a couple of things I … Read more
Anything to do with using the Google Places API is going to be off-topic here, but the best place to start would be the developer docs. However, how you interact with the API data within WordPress is certainly on-topic. I would suggest a wrapper function that caches the results periodically: /** * Get places data … Read more
This code worked perfectly fine: function custom_columns( $columns ) { $columns = array( ‘cb’ => ‘<input type=”checkbox” />’, ‘title’ => ‘Title’, ‘featured_image’ => ‘Image’, ‘categories’ => ‘Categories’, ‘amazon_url’ => ‘Amazon Link’, ‘comments’ => ‘<span class=”vers”><div title=”Comments” class=”comment-grey-bubble”></div></span>’, ‘date’ => ‘Date’ ); return $columns; } add_filter(‘manage_posts_columns’ , ‘custom_columns’); function custom_columns_data( $column, $post_id ) { switch ( … Read more
You check if !$value before assigning the title from the fields, that test will be false once the post has a title. If you always want it to update, then remove the test. function auto_title_insert() { return $_POST[‘fields’][‘field_538626f57e84c’].’ ‘.$_POST[‘fields’][‘field_538627ffeccb0′].’ ‘.$_POST[‘fields’][‘field_53863a5c7502b’].’ ‘.$_POST[‘fields’][‘fields[field_53a9bb09f82ba]’]; } add_filter( ‘title_save_pre’, ‘auto_title_insert’ );
Shouldn’t you be doing something like this? <img src=”https://wordpress.stackexchange.com/questions/99655/<?php echo $rand[“url’]; ?>” alt=”https://wordpress.stackexchange.com/questions/99655/<?php echo $rand[“alt’]; ?>” /> Update I’m not really familiar with that plugin (stuff could be happening behind the scenes) but here’s a better guess than my previous one: <?php $gallery = get_field(‘gallery_home’); $rand = array_rand($gallery, 1); if( $gallery ): ?> <img src=”https://wordpress.stackexchange.com/questions/99655/<?php … Read more
You can try this $field = get_field_object(‘color’); $colors = get_field(‘color’); // array of selected color values foreach($colors as $color){ echo “selected color: “. $color. ” with label: ” . $field[‘choices’][ $color ]; } where the labels are fetched by get_field_object according to the link you provided. You could also use print_r() or var_dump() to check … Read more