Support

Account

Home Forums General Issues Possible to have all pages with the same template share field content?

Solved

Possible to have all pages with the same template share field content?

  • Let’s say I have multiple WordPress pages using the same ‘content-page.php’ WordPress template.

    Is it possible for all of those pages to not only have the same ACF fields, but also for them to all be the exact same content. For instance, if I updated one of the fields on one of the pages that uses the content-page.php WordPress template, I want it to update those fields on all the other pages that use the same template.

    My reason for this is simple: I am using ACF to allow the user to add ‘Resources’ to the right column of each page. However, these resources would be the same on every page, so rather than having to add the same resources over-and-over to every page (well, every page that uses this template I mean) it would be nice to be able to just have all the pages pull from the same template.

  • The best solution to this would be to have an “Options” page using ACF Pro (or the options page add on which is still available for ACF4 http://www.advancedcustomfields.com/add-ons/)

    Then you can create an options page, add you custom field group to the options page and then pull the values from the options page for all of your pages.

    Without using an options page you would need to use the acf/save_post hook http://www.advancedcustomfields.com/resources/acfsave_post/

    You could do a query in you function to get all the pages and then update all of the fields on all of the pages.

  • Thanks again John! I’ll probably go ahead and purchase the PRO version since that has a lot of other features I would like as well!

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

The topic ‘Possible to have all pages with the same template share field content?’ is closed to new replies.