Custom template shorcodes

WordPress
August 23, 2021 22: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.
August 24, 2021 08:07:34
E2Pdf
Topics: 7
Messages: 3614
Support
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!
August 24, 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).
Get News and Updates
Our monthly newsletter keeps you in the loop, so you'll always be up to date with the latest news and updates about E2Pdf.
* You can update your email subscription preferences here.
All trademarks, service marks, trade names, product names, and logos appearing on this website are the property of their respective owners. The use of trademarks such as Formidable Forms®, Forminator Forms®, Gravity Forms®, JetFormBuilder®, WordPress®, WooCommerce®, WPForms® and others is solely for identification purposes (nominative use) and does not imply any affiliation, sponsorship, or endorsement by the respective trademark holders.
© 2017 - 2026, https://e2pdf.com

We use cookies to collect and analyse information on site performance and usage, to provide social media features and to enhance and customise content and advertisements. By clicking "Accept Selected", you consent to use of selected cookies according to our Cookie Policy.