Support

Account

Home Forums General Issues Showing Fields on parent page without hard-coding

Solving

Showing Fields on parent page without hard-coding

  • Hello everyone,
    is there a way to display fields from a page when the whole page is being displayed on its parent-page without having to hard-code the field into the parent-page?

    Because if I hardcode it into the parent-page it is also there if the child-page doesnt have the field and I have to hard-code every possible field in there because otherwise the editors can’t change the type of field they wanna use on that specific sub-page.

    Is there any way you can just show the page as it is on the child-page so that it keeps all its fields?

    Thanks for the help 🙂

    ps.: I hardcoded it with the name of the field and the ID of the page.

  • Meanwhile, I have put static content on the fron-end. Do you think that server may be overloaded by that many PHP requests at once?

  • Hi @typonerd and @maresj

    I am assuming you are referring to showing posts on a template page.

    You could opt to create a different template page then include the custom acf functions.

    However you could also introduce control structures to check if the post you are loading has the custom fields.

    I hope this helps.

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

You must be logged in to reply to this topic.