ACF only term ID is shown in Cornerstone layout builder

Hi there

I am in the proces of making custom post types with ACF for all realised projects of our company.

On the single post layout page I want to dynamically show terms such as location, style, model,… for every project. Therefore I made different taxonomies, a field group and 2 fields associated with the respective taxonomies. I added a text element and set But it seems Cornerstone can only show an output when the output is set to term ID in ACF settings. Then it shows the ID number in the text element. But I want the term text to be visible. When I select output to be term object in the field settings, it does not show anything. Is this an issue in Cornerstone or am I doing something wrong?

I am using cornerstone set as shortcode, not yet html (new update). Does this have anything to do with it?

Could you help?

I want to add private note with website details but it seems the option is not there anymore?

Please let me know how I can get support for this issue…

Thanks in advance!

Hello @wvl,

Thank you for the inquiry.

Are you using a dynamic content template to display the term ID? Please provide the login details using the secure note field. (see screenshot)

Best regards.

Image of the issue:

@Ismael please see original post. Secure note added :slight_smile:

Thank you for the info.

We enabled Twig and created a template that loops through the houtsoort field and renders the term name.

You can apply the same template for the rest of the taxonomies.

For more info about Twig templates, check this link: https://theme.co/docs/twig

Let us know if you need more info.

Best regards.

Thanks for the update. So there is no easy way to display taxonomy field names of ACF via dynamic content in Cornerstone (for instance the text editor)? Because when I set the term return value in ACF to “Term ID” I can use {{dc:acf:post_field field=“stijl”}} in Cornerstone and it displays the term ID. But when I select the return value in ACF to “Object ID” it does not show anything when applying {{dc:acf:post_field field=“stijl”}} and then I would need to add the custom code as you showed me? No easier way to display the term names?

Thank you for the update.

Please note that the dynamic content {{dc:acf:post_field field=“stijl”}} or {{dc:acf:post_field field="houtsoort "}} returns an array of terms , not a single entity, so it’s not possible to directly return the term name. You need to loop through the items in the array to extract the required data. We tried using the Looper Provider > Dynamic Content for this, but it didn’t work, so we used the Twig template instead.

Let us know if you need more info.

Best regards.

Thanks for the great support. I’m new with dynamic content and ACF. SO I appreciate the help…

I have a few more questions:

  1. I have now set the single page template for the custom post type “houten trappen”. But I would also like to add an archive page with all custom post types. These should include both “houten trappen” and “bekleding van betonnen trappen”. I tried to add a new archive layout named “Custom Post Archive Layout” and used a Themeco template “blog”, but it shows the normal blog posts. I assigned the layout to post type = “houten trappen” and post type = "bekleding van betonnen trappen but I cannot seem to make the posts to be the custom post types. Could you check what I am doing wrong and help me set this up?

  2. On this archive page I would also like to add selection / filters for all the 2 different post types “houten trappen” and “bekleding van betonnen trappen”, and also selection of the different terms, such as stijl, houtsoort etc, so visitors can easily make their selection and let it show only the posts for that term(s) selection. I am not sure how to implement this. Help would be very welcome.

  3. On the single page layout, I would like to add pagination, so visitors can easily scroll to the previous or next project. A bit like the portfolio is set up. Ideally this pagination should also be applied when certain terms are selected. So when on the archive page the term “houtsoort Franse EIk” is selected, visitors should be able to navigate previous and next post in this term category. Is this possible?

  4. I would like to apply better permalink structure. At the moment the permalink for the custom post type single posts still includes “/blog/” but the 2 custom post types “houten trappen” and “bekleding van betonnen trappen” should be separate from the blog and should have something like /projecten/houten-trappen and /projecten/bekleding-beton. In the wordpress permalink settings there is no separate field to be applied to custom post types. How could I achieve this?

I hope you can help me set this up :slight_smile: And I can learn more about dynamic content and ACF usage in Cornerstone…

Thanks in advance for the support…

Thank you for the update.

1.) : Is this going to be an actual archive page or a custom page displaying multiple items from different post types? You cannot use the default query from an archive page or layout to display multiple post types. You’ll have to create a custom Looper Provider using the Query Builder type. Please check this documentation.

https://theme.co/docs/loopers#query-builder

2-3.) These features are not available by default, unfortunately. If you’re interested, you can check out our One service.

4.) You will need to remove the default /blog path from the permalink since it will be used by every post type. If you need to change the base URL of a post type, you can use plugins such as https://wordpress.org/plugins/custom-post-type-permalinks/ or https://wordpress.org/plugins/permalink-manager/. Make sure to create a site backup or restore point before using any of these plugins.

If you have any additional questions at this time we kindly ask that you open them up in a separate thread. The longer threads get in the forum, they become more difficult to support as they tend to drift off topic and they also make it troublesome for users trying to search for solutions. Keeping threads relevant to their original inquiry ensures that we can keep better track of what has been resolved and that users can more effectively find answers to similar issues they might be experiencing.

Thanks!

Would it be an idea to create a different page for each custom post type (“houten trappen” and “bekleding betonnen trappen”) and also a different page for each term? Then on these specific pages, maybe I could add a custom looper provider using the query builder type to get all posts assiociated with the specific term? This way I could also more easily add the selection filter for the terms: as buttons above the posts that link to the specific page - a bit like category pages can be used in standard blog? Also, this way the permalink structure can be set without using a plugin I think? And /blog/ can remain the archive for blog, but since the custom post “archive” is actually a page (or multiple pages with each term), it can be shown without /blog/ in the url structure, right?

Yes, you can create custom pages for the archive pages and specific post types and use the Looper Provider > Query Builder to retrieve posts from a specific post type or taxonomy. However, when you access or view a specific item/post from a custom post type, the /blog path might still appear in the URL.

We still recommend using the Archive Layout if you need to build advanced layout for a specific archive/category page. Please check this documentation.

https://theme.co/docs/layout-builder-overview
https://theme.co/docs/archive-templates
https://theme.co/docs/archive-dynamic-content

Let us know if you need additional info.

Kind regards.

I have one more question:

My intent of using these custom post types (projects the company has realized) is to also being able to show them on different pages throughout the website to make these pages better. For instance, for each custom post there is the term “model”, for each different staircase model we have realized. There is a page for each model. So I would like to add all custom posts for a specific model on this page, a bit like you would embed “recent posts” on a page. Also there are location pages. Each custom post has the term “location” with all locations where we have realized projects. Also on this page I would like to add all projects for that specific location. How can I achieve this?

As mentioned above, you can use the Looper Provider to retrieve posts based on custom post types, taxonomies, or terms. As long as the structure of the post types is correct (e.g., associated with a specific taxonomy or term), you should be able to retrieve them using the available parameters in the Looper Provider. You can also create a Custom Looper Provider if necessary.

https://theme.co/docs/loopers#custom

Default archive pages will be created for the post types, taxonomies, and terms once they are registered. You can also utilize those if you don’t want to use the Looper Provider for any reason.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.