Skip Navigation

[Resolved] Show parent post information in The Grid Skin Builder

This thread is resolved. Here is a description of the problem and solution.

Problem: I would like to display the parent post's title in The Grid Skin Builder.

Solution: The meta key used to hold a parent post's ID is "_wpcf_belongs_slug_id". You can pass a post ID into the wpv-post-title to retrieve that post's title. So you can use a combination of Views shortcodes and The Grid's meta codes to display a parent post's information:

[wpv-post-title id="#meta:_wpcf_belongs_artist_id#"]

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-title

This support ticket is created 6 years, 8 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 7 replies, has 2 voices.

Last updated by chrisC-25 6 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#736840

I am trying to: Pull the Artist name from a parent relationship into a grid plugin. I am using the meta: _wpcf_belongs_artist_id but I want it to show the actual name of the Artist, not the number id. When you hover over a record in the grid it should show the record title and below I want the artist name, not the number. How can I accomplish this?

Link to a page where the issue can be seen:
hidden link

Thanks

#737539

It depends on the grid builder. If you have access to the _wpcf_belongs_artist_id value in the grid template using some type of shortcode, you might be able to use it in a Views post title shortcode like this:

[wpv-post-title id="[metavalue_shortcode]"]

It all depends on the grid builder software and what it allows you to do in the template for each grid item. Your grid builder may or may not support shortcodes, and it may or may not give you access to metadata this way.

Can you take some screenshots showing how the grid builder works, how to construct templates for each item in the grid, etc.?

#737664
Screen Shot 2018-04-25 at 2.50.54 PM.png

Hi,

Here are the plugin instructions for the skin builder:
hidden link
Also including a screenshot.
Thanks

#737674

The metadata element won't work, because it doesn't give you any customization options that will allow you to use shortcodes. Instead, you could try using a code or HTML element that allows you to insert shortcodes, and see what happens when you insert one like this:

Post: [wpv-post-title], Parent: [wpv-post-title id="$artist"]
#737927

Not quite, but there may some combination that works. Take a look at the link again.

#738070
Screen Shot 2018-04-25 at 4.11.29 PM.png

I have tried several options but can't figure it out. Screenshot shows example for customizing from plugin creator.

#742944

Based on the image you shared, it looks like #meta:_wpcf_belongs_artist_id# should give you access to the parent Artist's ID. So then if this builder system accepts shortcodes in content, you might be able to do something like this:

Post: [wpv-post-title], Parent: [wpv-post-title id="#meta:_wpcf_belongs_artist_id#"]
#742971

It worked! Thanks