Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for displaying ACF fields from Options Pages in MaxiBlocks #5592

Open
ckp267 opened this issue May 21, 2024 · 0 comments
Open

Add support for displaying ACF fields from Options Pages in MaxiBlocks #5592

ckp267 opened this issue May 21, 2024 · 0 comments

Comments

@ckp267
Copy link
Collaborator

ckp267 commented May 21, 2024

Description

Request from discord user Michel on MaxiBlocks discord:

NOTE: @ckp267 drafted this issue with the help of Claude.AI (Opus) to save time... Consider possible inaccuracies. Use your own discretion.

Michel says: I would like to have a feature that allows displaying ACF fields from Options Pages in MaxiBlocks because it would enable users to easily incorporate global data managed through ACF Options Pages into their MaxiBlocks-powered content. This feature will cover the following use cases:

  1. Displaying site-wide settings, such as header and footer content, that are managed through ACF Options Pages
  2. Integrating global data from Options Pages into MaxiBlocks without the need for custom code or workarounds, such as creating custom post types

image

Other plugins or websites examples

The Advanced Custom Fields (ACF) plugin itself provides the functionality to create Options Pages and retrieve their field values using functions like get_field('field_name', 'option') in PHP.

However, having native support for displaying ACF Options Page fields directly in MaxiBlocks would greatly enhance the user experience and flexibility of the plugin.

https://www.advancedcustomfields.com/resources/options-page/

How to implement it

One possible approach to implement this feature would be to add support for the option parameter in the MaxiBlocks field retrieval process. This would allow MaxiBlocks to recognize and retrieve ACF fields associated with Options Pages, similar to how it currently handles fields from posts, pages, and custom post types.

Additionally, providing a clear indication or separate section for Options Page fields within the MaxiBlocks field selection interface would help users easily identify and work with these global fields.

Other information

As mentioned in the Discord conversation, the user had to create a custom post type as a workaround to display global data in MaxiBlocks. By adding native support for ACF Options Page fields, MaxiBlocks would eliminate the need for such workarounds and provide a more intuitive and streamlined experience for users working with global data in their MaxiBlocks-powered websites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants