Home Forums Front-end Issues Custom fields not showing in front end


Custom fields not showing in front end

  • Hi there,

    I am having problems trying to get custom fields to display in the frontend to work. I installed Custom Post types UI with the following settings:

    slug: casestudies, Supports: Titles, Editor, Custom Fields, Featured Image

    Next I installed ACF with the following settings:

    Field Group: Case Studies, Show this field group if: Post Type equals casestudies, Field1: odmfullname, Field2: odmemail.

    I created 2 sample case studies posts: and My problem is that neither of those pages will display the custom fields I created. Further I have no idea how to force those posts to display a specific template.

    Any ideas please?

    Thanks, Meeker

  • Custom fields created with ACF to done automatically appear on the front end for posts they are attached to. You need to add code to the template files in order to show the fields.

    In your case you should create a new template file names single-casestudies.php. This template will show each of the posts in your custom post type. You can start by copying the file single.php and then edit it.

    The next step is to add php code to get and display your custom values. Form more information you can start with the_field() and look at other documents depending on what you need to do.

  • Thanks, that worked a treat. Much appreciated. I also ended up creating a shortcode in functions.php and that worked as well.

  • I think this is a little stupid. Because you buy a plugin for this exclusive function and the fields are not displayed on the front end. Thousands of people searching for the same thing on the internet. The plugin is good, but this is something that makes no sense.

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.