Home Forums Add-ons Flexible Content Field Content not appearing after creating flexible content fields


Content not appearing after creating flexible content fields

  • Hi all,

    I hope I’ve picked the right place for this query and that someone is able to understand and confirm my thoughts please.

    Just some context first – we have used a firm to create a website for us and they have used WordPress, have installed ACF and the Flexible Content Field add-on. They have also created a custom theme for us. It’s only 5 pages meant for information only. We are able to create new pages ourselves, are at a stage where we need to add a 6th page and want to do this ourselves.

    Within ACF, have 3 Field Groups, with “Page Content” being the main one.

    Within “Page Content” with have 4 fields, “Banner Image”, “Banner Headline”, “Banner Copy” and “Page Blocks” ( which is the flexible content field ).

    Within “Page Blocks” we have 5 Layouts, with the main being “Content & Image Block”. This block uses a Text Area type for written content.

    My query is : I want to create a new layout that uses the WYSIWYG type rather than a Text Area type. I’ve copied the “Content & Image Block”, named it “WYSIWYG Block” and changed the content field to WYSIWYG.

    When I edit the new page I can access the WYSIWYG block but when I preview the page it doesn’t display the WYSIWYG block. If I copy the original “Content & Image Block” and try to use that, again, I can fill in the new fields but it doesn’t display the block when I preview the page.

    Is the developer of our site able to configure it to stop us creating new layouts or do I just need to write a new JSON file to create this layout? I’ve checked and there doesn’t seem to be a maximum number set for layouts.

    I hope I’ve explained this clearly.

    Thank you to anyone who is able to answer my query.

  • The developer did not prevent you from creating new layouts. Each new layout must have corresponding code in your theme to display that layout.

    Somewhere in the code of the theme there will be a call to the function get_row_layout(). This call returns the layout name of the current layout in the flex field. This code will be followed by code created specifically for displaying the fields based on the layout name returned.

    Different developers do this in different ways, but without adding the code for the layout the layout will just be ignored because the code does not know what to do with it.

  • Thank you John, that clears up my query.

    Thanks for taking the time to explain, it’s appreciated.

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

The topic ‘Content not appearing after creating flexible content fields’ is closed to new replies.