Hi everyone
i’m using “Facebook Instant Articles & Google AMP Pages by PageFrog” and i need to add field in plugin’s amp template (because it doesn’t recognize automatically ACF fields)
In ‘/admin/partials/pagefrog-amp-template-single.php’ in the plugin folder, i manage to add :
echo get_field(‘field_name’);
and it works
but for Repeater Field and Flexible Content Field, i don’t know what to do.
Could you help me with this , pls?
Thanks
Hi @multitech
If you only need to print the value, then you should be able to do it normally. Kindly check this page to learn how to use the repeater field: https://www.advancedcustomfields.com/resources/repeater/, and this page to learn how to use the flexible field: https://www.advancedcustomfields.com/resources/flexible-content/.
I hope this helps 🙂
Hi
thx for fast reply, this seems to work but only with preview link in pagefrog plugin, not with the real /amp/page(URL). Maybe i should ask on pageFrog support?
Unless someone here got an idea.
Hi @multitech
It’s possible the real /amp/page(URL) doesn’t have the global $post set correctly. In this case, could you please try to pass the post ID where the fields are set like this:
have_rows('repeater_field_name', '99');
Where ’99’ is the post ID.
If that doesn’t work, then I suggest you get in touch with pageFrog support about it.
I hope this helps 🙂
Hi sorry for my late reply and thx for your time. But unfortunately it doesn’t work. I hope we will find a solution oneday, cause it’s important for SEO now