ACF in custom template not working

Posted in: Newspaper
Post count: 3

Hello there,

I want to use Advanced Custom Fields in my custom article template to show more than one source via a text field. The problem is that I can’t find a way to show the content of ACF in my template. I use the following php code for it:
<?php the_field( ‘quellen’ ); ?>

I tried blocks like “Raw HTML”, “inline text” and “column text” but nothing works. Is there a folder for custom templates that I can access via FTP so I can put in the php code directly? Or is there any other way to use php code in custom templates?

I hope anyone can help!

Best,
Sebastian

Post count: 20688

Hi,

You could go by code like in this topic maybe – https://forum.tagdiv.com/topic/add-a-custom-row-like-via-or-source-name-in-posts/

PHP codes like the one you mention have to be entered in the post template files, in order to be displayed in the posts that use those templates
https://www.screencast.com/t/5qQCPBIUJE
Each post template has a corresponding loop file, try to add that code in a post template.

This is a related topic where some examples are mentioned
https://forum.tagdiv.com/topic/custom-fields-howto-any-help/

Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.