Skip Navigation

[Gelöst] Creating a formated list of results from ACF Fields in a CPT

This support ticket is created vor 4 Jahre, 8 Monate. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Luigi Bella vor 4 Jahre, 8 Monate.

Assistiert von: Waqar.

Author
Artikel
#1337427
Screen-Shot-2019-09-10-at-9.59.33-PM.jpg

Hi There, I am trying to use Toolset to recreate the functionality of this page: versteckter Link

The page is from a CPT, which I have recreated on the new site, and the Post has an ACF Repeater FIeld called Attachments.
The details of the ACF FIeld and Sub Fields can be seen in this video: versteckter Link

Could you help me find a way to display the results from the different Attachments in as similar a way as possible to the page I linked to above?

Thank you so much!

#1337717

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Luigi,

Thank you for contacting us and I'd be happy to assist.

The "Advanced Custom Fields" plugin (ACF) stores it's repeater field data, in a different way than Toolset Types custom fields.

To get that data, ACF plugin provides its own methods and functions, as explained in this guide:
versteckter Link

You can use the example code snippets from that guide in a custom shortcode, to show the content in your desired format.
( ref: https://toolset.com/documentation/adding-custom-code/how-to-create-a-custom-shortcode/ )

The interactive pagination control that is shown on the top, will also require some custom HTML and jQuery/JavaScript code, to make sure only the selected number of items are shown at a time.

In order to use the Toolset Views plugin to show this data, it will need to be stored in the Toolset Types' repeatable field group:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/

I hope this helps and for more personalized assistance around custom code, you can also consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/

regards,
Waqar

#1340623
Screen-Shot-2019-09-15-at-7.12.04-PM.jpg

Hi Waqar, thanks for your help!
Your links were extremely useful.

May I ask how you would recommend making such a function using Toolset, I think it may be a good idea to restart instead of keeping the ACF Fields mixed in.

And there is a red banner that displays whenever an Event CPT is published with the ACF Field 'Major Event' set to Yes, can such a banner and condition be created using Toolset as well?

Thank you for your time!

#1340919

Waqar
Supporter

Sprachen: Englisch (English )

Zeitzone: Asia/Karachi (GMT+05:00)

Hi Luigi,

Thanks for writing back and glad those links were useful.

> May I ask how you would recommend making such a function using Toolset, I think it may be a good idea to restart instead of keeping the ACF Fields mixed in.

- Toolset Types offer "Repeatable Field Groups" which can be used as a replacement for ACF plugin's repeater field.

Through a repeatable field group, you can store multiple and independent entries of data into grouped fields, with an individual post.

You can create a new repeatable field group for your post type and then include the subfields inside it, as explained in this guide:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#creating-repeatable-field-groups

That data can be then shown on the front-end using Toolset post view, as explained at:
https://toolset.com/documentation/getting-started-with-toolset/creating-and-displaying-repeatable-field-groups/#displaying-repeatable-field-groups

This will allow you to manage and show your data through Toolset, without the need for an additional plugin like ACF.

> And there is a red banner that displays whenever an Event CPT is published with the ACF Field 'Major Event' set to Yes, can such a banner and condition be created using Toolset as well?

- Yes, the Toolset Views plugin offers conditional display blocks, which can show or hide specific elements, based on a different type of conditions, including a custom field value:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#1345225

Thanks for your help!

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.