Is there a way to create my own customs shortcodes?
I'm using ACF, and it allows me to create a global configuration page.
acf_add_options_page(array(
'page_title' => '......',
'menu_title' => '.....',
'menu_slug' => '.....',
'capability' => 'edit_posts'
));
There I can attach custom fields. Then later I can access this info from anywhere using
return get_field( $field_name, 'options' );
Is there any way to access these fields from the templates and of course while rendering?
Thank you in advance.
24 August, 2021 08:07:34
E2Pdf
Support
Topics: 7
Messages: 3335
Hi,
You must be able to use "acf" shortocodes as follows to output information from options page field:
[acf field="test" post_id="option"]
* where test is the Field Name.
We remain at your service.
We would really appreciate your feedback at WordPress.org!
24 August, 2021 08:51:06
Crash
Topics: 4
Messages: 6
Works like a charm, Thank you so much.
Amazing support and documentation never enjoyed working with a plugin like E2PdF. It is a pleasure doing business with you guys.
I'm giving my review and getting the pro-version to support further development, despite I only need the features of the free version (one template, one page).
We use tools, such as cookies, to enable essential services and functionality on our site and to collect data on how visitors interact with our site, products and services. By accepting cookies you are agreeing to our Cookie Policy.