You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to request a new feature for Sage Directives that enables direct access to ACF fields related to a specific post using a custom Blade directive.
Currently, to fetch and display an ACF field related to a specific post, one needs to use the get_field function within PHP blocks. For example: $customerName = get_field('projectKeyfacts', $project->ID)['projectCustomer']->post_title;
Given that $project already returns the post object, it would be beneficialto have a dedicated directive to simplify this process. @directive('fieldName', 'fieldKey', $post->ID)
If there are any considerations or alternative methods for achieving this functionality, I am open to suggestions. Thank you for considering this feature request.
The text was updated successfully, but these errors were encountered:
I would like to request a new feature for Sage Directives that enables direct access to ACF fields related to a specific post using a custom Blade directive.
Currently, to fetch and display an ACF field related to a specific post, one needs to use the get_field function within PHP blocks. For example:
$customerName = get_field('projectKeyfacts', $project->ID)['projectCustomer']->post_title;
Given that
$project
already returns the post object, it would be beneficialto have a dedicated directive to simplify this process.@directive('fieldName', 'fieldKey', $post->ID)
If there are any considerations or alternative methods for achieving this functionality, I am open to suggestions. Thank you for considering this feature request.
The text was updated successfully, but these errors were encountered: