Custom template shorcodes

WordPress
23 August, 2021 15:27:28
Crash
Topics: 4
Messages: 6
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 01:07:34
E2Pdf
Support
Topics: 7
Messages: 2259
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.
If you appreciate our support , we would really appreciate your feedback at WordPress.org!
24 August, 2021 01: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).