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?
I don’t use Twig, but I’m fairly sure that you have to pass values rather than all WP functions from the template (which probably runs outside the context of WordPress). So, your controller (typically the WordPress template) will store the results of the WP calls into an array, and then you render the Twig template … Read more
Wouldn’t it be better to have the users fill out the title field and use it as the client name? Woothemes’ testimonials plugin does this. If that’s not an option, you can look into adding a filter on title_save_pre. Haven’t used it myself but here are examples: From StackExchange: Title_save_pre – Simple problem that u … Read more
Your question is not entirely clear, but it looks like you are in need of wp_localize_script, which allows you to pass variables from PHP to a script. You would use it like this (example with two fields): add_action (‘wp_enqueue_scripts’,’wpse244551_add_field’); function wpse244551_add_field () { $my_field = array (); $my_field[] = array (field1 => get_field (‘field1’)); $my_field[] … Read more
You have forgotten a semicolon after your endwhile on line 21.
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’ ).'”]’ ); ?>
Custom protected password page with ACF
Since you are not using $field_value after if-else, you can start rewriting that if if (substr($field_value, 0,4) === ‘http’) { $field_value=”<a target=”_blank” href=”” . $field_value . ‘”>’ . $field_value . ‘</a>’; } /* else { no else statement here! } */ and just use it later like this: $html .= ‘<span class=”lajax-value”>’ . $field_value . … Read more
If the line breaks exist in the database, you just need to run your custom field output through wpautop(). Changes double line-breaks in the text into HTML paragraphs (<p>…</p>). If that doesn’t work, then the line breaks probably are getting stripped before going into the database. In that case you’ll need to share the code … Read more
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