FAQ Database Discussion Community

Use Taxonomy ACF to affect Custom Taxonomy post count

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...

how to use string vars in echo function

I want to use this code in my header.php template in word press for using ACF plugin fields. But it doesn't work. such as href attributes is not worked. This is My code: echo '<div align="center">'; //Rule Adress if (the_field("rule") != 'http://' || the_field("rule") != '') { echo '<a href="'...

Insert new line when updating field in ACF

I'm using update_sub_field( array('subscribers_lists',$field_row,'subscribers'), $current_subscribers ); to update certain custom fields. Everything works as expected except when $current_subscribers has '\n'or <br> - it won't do a new line as I would expect. How would I force a new line when adding text to a field using ACF?...

Acf fields and function

New to php and Acf, thanks for the help. I want to display a static banner in all pages except the home page that has a video. How do I use the if main function?

Conditional Logic for links in ACF

So here is what im trying to do. Im using Advanced Custom Fields for this and am outputting a title with a link, But sometimes their is NO link. When there is NO link I don't want this to be wrapped in a tag but I can't seem to figure...

adf test and acf plot on multiple columns

I am trying to apply adf.test to all columns of a dataframe. Some columns have NA values. I would like to store the output in a vector/list/dataframe. H<-data.frame(replicate(10,sample(0:20,10,rep=TRUE))) H[c(2,3,7,9),9]<-NA H[c(1,4,8),2]<-NA H[c(1,2,3,4,8),4]<-NA I get errors as below oi<-adf.test(H,alternative="stationary") Error in adf.test(H, alternative = "stationary") : x is not a vector or...

ACF Multiple Map Markers

I'm using Advanced Custom Fields and want to pull in the field called 'location' to display some locations on a map. How would i adjust the following code to display multiple markers from my location field? The format of the custom field is like so: echo 'Location: ' . get_field('location');...

Enclosured php element in p-tag is ouside p, how is this possible?

I am using advanced custom fields in wordpress and having this line of code: <p class="small"><?php the_field('somefield', 'options'); ?></p> And it is printed like this in the browser: <p class="small></p> <p>the content of somefield</p> Why does this happen and how do I fix it?...

Echo array value three levels deep (acf and wordpress)

I am trying to get some values from the post_objects array produced when using ACF http://www.advancedcustomfields.com/resources/post-object/ This is the array I have: Array ( [team_member] => WP_Post Object ( [ID] => 57 [post_author] => 2 [post_date] => 2015-05-26 14:41:04 [post_date_gmt] => 2015-05-26 14:41:04 [post_content] => Lorem ipsum dolor sit amet,...

advance custom field: missing value [closed]

Here is my problem: I created a field named « subtitle » which is supposed to appear on an overlay, on the portfolio thumbnails of my theme. I inserted the code like that: $gallery .= '<h2 class="portfolio-title">' . $title . '</h2>'; $gallery .= '<h3 class="portfolio-subtitle">' .the_field('subtitle') .'</h3>'; $gallery .= '<span>'...