Hi @fdh,
You need to add the relevant ACF code to the template file.
If you’re just starting out with ACF then go here: https://www.advancedcustomfields.com/resources/getting-started-with-acf/ and read the “Displaying Fields” section.
Hi @theresa,
It seems very do-able, but I probably wouldn’t use ACF for it.
I’d start by getting the custom login form sorted (there’s lots of different ways to do it: https://bit.ly/2vZIMsJ) and then working on the other bits.
Let me know if you need any more info.
Bumping this one as I’m having issues with TimeMCE plugins too.
Hi @james,
I updated to version 5.5.14 last night and unfortunately the above solution no longer seems to work :-(.
Do you have any idea on what may of changed in the latest build?
Thanks,
Shaun
Hi Elliot,
I’ve just created a support ticket – it’s titled ‘Newly Created and Draft Pages Not Displaying Custom Fields on Preview’.
Thanks
Hi @elliot,
I’ve tested it on three sites I’m currently working on and all are exhibiting the same behaviour.
I’ll create a fresh install and write up a detailed explanation of the problem when I get time over the next few days.
Thanks
I too am having this issue.
And it is driving me mad.
Hi John,
Thanks for replying.
I’ve done some further testing and it looks like there’s also an issue when the page is saved as a draft.
Basically hitting preview whilst the page is a draft is borked. I have to hit ‘save draft’ and then preview to see the changes. It is completely unworkable to have to publish a page first as I’m using flexible content fields as a page builder.
I’ve tried the work-around in the post but it dates back to 2013 and doesn’t seem to be working.
Thanks
Hi John,
Thanks for your help, just needed to change $post_id to get_the_ID() in your example and it worked! Yaay.
<?php
$current_post = get_the_ID();
if( have_rows('acf-colours', 'option') ):
while( have_rows('acf-colours', 'option') ) : the_row();
$post_objects = get_sub_field('pages');
if( ($post_objects) ):
foreach ($post_objects as $post_object) {
if ($post_object == $current_post) {
?> sub-menu-<?php the_sub_field( 'colour' );
} // end if current post
} // end foreach post
endif;
endwhile;
endif;
?>
Thanks again for your help.
Thanks for your help @james, really appreciate it.
Have a great weekend.
Thanks @james,
The only issue I’ve got now is how to use an image array in a repeater field. So I’ve got the field key for the repeater field (which is an image array), but I’m not sure how to adapt your example to get the URL of the image?
Any help you can provide is greatly appreciated.
Thanks,
Shaun
Hi @james,
Thanks for your help, really appreciate it.
The code you kindly provided is working when there’s repeater content already present on page load but if a repeater field is added then unfortunately the page title does not update.
I’ve attched a gif showing the issue.
Do you have any ideas about what the problem could be?
Thanks again for your help.
Shaun
Hi @James,
Thanks for your message.
I’ve added the json as a private message below.
I’ve attached a GIF which will hopefully make it a little clearer what the problem is.
Thanks,
Shaun
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.