advanced-custom-fields

WordPress advanced custom fields, loop though repeater

房东的猫 提交于 2019-12-25 01:48:27
问题 What I have I have a repeater setup in Advanced custom fields and bootstrap slider in my code. What I trying to achieve I would like to add a image and text in my WordPress repeater and have it populate my slider. so that each new repeater row has its own image and text. I have the image working, but not the text so at the moment every slide has its own image, but for some reason I have all the text displaying for each slide. bellow is the layout of my ACF repeater bellow is my current slider

Use Taxonomy ACF to affect Custom Taxonomy post count

爷,独闯天下 提交于 2019-12-24 16:39:31
问题 Is there a way to use an "ACF Taxonomy Field" to affect "Custom Taxonomy" post count? Right now I am using ACF Taxonomy Field, but my Custom Taxonomies have 0 posts assigned. I want to use ACF to assign Custom Post to Custom Taxonomy: Instead of the default way: Is this possible? I'm trying to do this way because it is more friendly to the end-user and ACF is more flexible; I can restrict it if I need the user to select only one taxonomy and make other restrictions. 回答1: Very big and basic

ACF front end form to update term

坚强是说给别人听的谎言 提交于 2019-12-24 05:54:56
问题 I want to use ACF frontend form function to create a form with custom fields I see this issue for create new term, @Alhana ACF front end form to create term but I want to generate the form with old data 回答1: Well, i didn't see that question, but if it's still actual, here's a solution. First of all, make sure you have ACF group, linked to your taxonomy. You will need ID of this group, it can be found in url on group edit page, for example: http://site.ru/wp-admin/post.php?post=340&action=edit

Save value for each ACF repeater field row and place all values into one array (PHP)

独自空忆成欢 提交于 2019-12-24 03:21:11
问题 I am using WordPress and Advanced Custom Fields to build a website. I have an Advanced Custom Field repeater field for an event listing on my website. For each event row, there is a sub field to input a date. I have attempted to save those sub fields into a $dates array. However, this $dates array is outputting several arrays with only one value with var_dump() . Output of $dates : array(1) { [0]=> string(20) "June 5, 2018 5:00 pm" } array(1) { [0]=> string(22) "June 15, 2018 12:00 am" }

Save value for each ACF repeater field row and place all values into one array (PHP)

浪尽此生 提交于 2019-12-24 03:20:35
问题 I am using WordPress and Advanced Custom Fields to build a website. I have an Advanced Custom Field repeater field for an event listing on my website. For each event row, there is a sub field to input a date. I have attempted to save those sub fields into a $dates array. However, this $dates array is outputting several arrays with only one value with var_dump() . Output of $dates : array(1) { [0]=> string(20) "June 5, 2018 5:00 pm" } array(1) { [0]=> string(22) "June 15, 2018 12:00 am" }

Load Same ACF Map Twice on Same Page

只谈情不闲聊 提交于 2019-12-24 01:15:02
问题 I am working on a website: MetroCRE and am trying to use the Google Maps integration with Advanced Custom Fields. Now the map is working, however due to specific client needs, they want it in one location on mobile, and within the tab selection that exists on desktop. However, it is not possible to load the Google Map field twice on the same page. On mobile, the map works, or resizing the browser at all will make it load, but on page load it will not at >= 768px Does anyone know of any way to

WordPress: ACF add rows to a repeater field

两盒软妹~` 提交于 2019-12-23 12:24:21
问题 I'm looking for a way to add rows to a repeater field in ACF Pro. I found this post but the solution post doesn't seem to work. I will describe my problem: I have a custom post type called "gebruikers", a repeater field called "logins" and a rows that can have a field called "datum". I would like to be able to add a value to a new row in the field "datum". Is this possible? My code so far: $field_key = "logins"; $user_id = "gebruiker_23"; $value = get_field($field_key, $user_id); $value[] =

PHP if/else get_field() with WordPress

↘锁芯ラ 提交于 2019-12-23 09:57:57
问题 I'm trying to give a client some options in the WP backend to customize a carousel that is displayed on their website's homepage. I am using Advanced Custom Fields to handle getting the input from the client. I want to give them two options: Option #1) Allows the client to insert a string of text to be displayed ('carousel_title_text') Option #2) Allows the client to upload a logo to be displayed ('carousel_logo') I want the code to check for title text, and if there is none, display the logo

Update select field in repeater based upon the choice of other select field (ACF)

北慕城南 提交于 2019-12-23 04:45:08
问题 I've been looking for this a while and I can't really find a solution. I've read plenty of articles and all about dynamically populating select fields, but the way they're implemented isn't really what I'm looking for. I have a repeater field on a page where the user can select multiple acts (from the Act CPT). In these acts there is a repeater field in which they can add the different times the act is going to perform. My 'choose acts' repeater is something like this. Choose Act (select

ACF fields not showing on a wordpress custom taxonomy page

淺唱寂寞╮ 提交于 2019-12-23 03:11:53
问题 I'm having trouble showing ACF on a custom taxonomy page. The custom tax is 'destinations' with the page being taxomony-destinations.php the field is called 'destination_landing_image. I'm trying to display it on 'mysite.com/destinations/coutryname' as follows: <?php if (have_posts()) : while (have_posts()) : the_post(); $destination_landing_image = get_field('destination_landing_image'); <img src="<?php echo $destination_landing_image['url'] ?>" alt="<?php echo $destination_landing_image[