Home › Forums › General Issues › Getting ACF to work with Pagelines DMS › Reply To: Getting ACF to work with Pagelines DMS
Hello!
I solve my problem with ACF & DMS.
I have installed Pagelines Customize plugin and add filter to
plugins/pagelines-customize/functions.php file.
You can take plugin download link there (pagelines support forum):
http://forum.pagelines.com/topic/29473-cant-find-the-pagelines-customize-plugin/?hl=pagelines+customiz
The code that work for me:`add_filter( 'the_content', 'add_acf' );
function add_acf( $content ){
if( ! is_single() ) // if were not on a post/page just return the content.
return $content;
$label1 = get_field_object('soc-dosl'); //set label of the field
$field_1 = '<p>' . '<div class=”dop-dani”>' . $label1['label'] . ': </div>' . get_field('soc-dosl') . '</p>'; // set content of string – label plus field plus markup.
return $content . $field_1; //Show result of concatenation of content with field label and field content
}
`
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.