thanks Elliot, but i sometimes seen this expression with % : dates_%_date_spectacle
does no it means all fields ?
thanks
Elliot please would you have an idea ?
thanks
i also try to get all spectacle where date >= date today but i don’t know how
this is what i got :
Array ( [0] => Array ( [date_event] => 05/02/2015 [location] => 12 [hours] => 20h ) )
How can i convert location id (12) to his name please ???
thanks
does not work too…
$args = array (
‘post_type’ => ‘spectacle’,
‘meta_key’ => ‘dates_0_date_spectacle’,
‘meta_value’ => ’05/02/2015′
);
////
echo get_field(‘dates_0_date_spectacle’) -> 05/02/2015
i tried like this, to try to display only if one post has the same date than today date but i ‘ve all the post instead of only one.
$today = date(“d/m/Y”);
$args = array (
‘post_type’ => ‘spectacle’,
‘meta_key’ =>’dates_0_date_spectacle’,
‘orderby’ => ‘meta_value_num’,
‘meta_value’ => $today,
‘meta_compare’ => ‘=’,
);
ok i gonna try like thus, thanks !!
Thanks a lot for your answer, but i don’t understand …
For the field type, i don’t use a SELECT, but a TAXONOMY (relationnal) in order to list my custom taxonomy dynamically.
If you SELECT can do that, i can use it but i don’t see how…
thanks
please anybody knows how to add a blank textfield “OTHER” to a dropdown ??
if needed i can add precisions, i don’t know if my request is very clear…
hi eherman24
thanks a lot , would you have any solution for a custom taxonomy ?
thnaks
revolution slider had this function : getPostsByCategory.
with this query arg :
$query = array(
‘order’=>$direction,
‘posts_per_page’=>$numPosts,
‘showposts’=>$numPosts,
‘post_type’=>$postTypes,
);
my post has a ACF date repeater field (thedates) and i need to sort with first date of each one .
i tried to add this :
‘meta_key’ =>’thedates_0_thedate’,
‘orderby’ => ‘meta_value_num’,
but how could i filter to not display past post ? only if post >= today date ?
To display the date on slide i use the meta tag Revolution slider %meta:thedates_0_thedate% but the format is YYYYMMDD, i need to change it.
And %meta:mycustomtaxonomy% return and display the ID but not the name…
THANKS !!!
anyone knows revolution slider ??
thnaks
Hi,
Works perfectly !
Thanks for your great support !
I precise that i used a simple custom field named “thedate” we would have ‘meta_key’ => ‘thedate’ but how can i do with repeater ?
In fact , more generally this is my case :
I created a custom post type and added the ACF fields in the admin post page.
My first ACF fiels is a WP User Dropdown, and when loading page or changing value in drop down list i need to update all fiels that depends on $user_id
thanks
oh yes !!! magical ! this.value gives me directly the user ID, !!
when select on change , how could i set my other act fields with new values please ?
thanks
ok it works with this below, could you please now have a look at my second question please ? thanks
function my_acf_admin_head()
{
?>
<script type="text/javascript">
jQuery(function($){
$('select').on('change', function() {alert( this.value );})
});
</script>
<?php
}
add_action('acf/input/admin_head', 'my_acf_admin_head');
…my second question would be:
I get the WP users in your Dropdown field by login, how could i retrieve user ID onchange in the list ?
thanks
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.