Загрузка...

ACF (Advanced Custom Fields) Taxonomy Shortcode

Advanced Custom Fields have an option to output the custom field data on the front-end via shortcode. However, the shortcode feature only allows you to output simple text based fields. Often you want to have a custom field that pulls data from your taxonomy and you cannot output that data with the default shortcode.

Other related videos:
Web Design Case Study (Kadence Theme & Gutenberg)
https://youtu.be/jY8BENgRCV4

Kadence Hooked Elements with Dynamic Content (ACF)
https://www.youtube.com/watch?v=fwgMbCWFDHI

Search & Filter Pro for your WordPress archives
https://www.youtube.com/watch?v=1mxUrKqv_uw

In this video I show you how I created a custom plugin that actually registers a new shortcode, one that will output custom field data based on taxonomies, where you can have a multiple choice and output multiple selections on the front-end, inline or each selected choice as a new line (or however you want really, it's just a simple edit to HTML).

HOW TO INSTALL
1. Download the plugin ZIP file here: https://bit.ly/3xK18Nw
2. If you want to make some changes, you can edit that PHP file.
3. ZIP it again and upload as a new plugin to your WordPress.
4. If you want to make edits on the go, you can use Plugin Editor and alter the code to your liking after uploading the plugin. Just keep in mind, you can break things if you have a syntax error and you should only proceed with such editing if you have access to your server to restore things if needed.

Do not worry, in the video I say that my custom plugin won't work for you out of the box, but I edited and removed the part I needed for my client so it can work for you instantly without any modification.

CUSTOM SHORTCODE
[acfcustom field="field_name"]

If you have any further questions, feel free to ask in the comments below.

TABLE OF CONTENTS
00:00 Intro
01:36 What do I use custom ACF shortcode for
05:05 How ACF taxonomy shortcode works
09:17 Explaining the plugin code and how to edit
20:30 Final thoughts

MUSIC
Danger Storm by Kevin MacLeod
Link: https://incompetech.filmmusic.io/song/4985-danger-storm
License: https://filmmusic.io/standard-license

Видео ACF (Advanced Custom Fields) Taxonomy Shortcode канала mistergeko
Яндекс.Метрика

На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.

Об использовании CookiesПринять