Skip Navigation

[Resolved] Link to post with custom field name

This support ticket is created 7 years, 5 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
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

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

This topic contains 3 replies, has 2 voices.

Last updated by Noman 7 years, 5 months ago.

Assisted by: Noman.

Author
Posts
#527883

I have a custom post type with custom fields.
In these posts there is a list of names.
There will then be another post of the same type for each of the names within the first post.
In the first post I want each name to link to it's own post.

So in the custom content template I would have something like...

<a href="[types field='name1url'] [/types]">[types field='name1'] [/types]</a><br/>
<a href="[types field='name2url'] [/types]">[types field='name2'] [/types]</a>

Is this possible?

#527902

Noman
Supporter

Languages: English (English )

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

Hi Jill,

Thank you for contacting Toolset Support. If you want to use the following code in Content Template, then you will need to add the static URLs (e.g. hidden link) and there is no shortcode for this:

[types field='name1url'] [/types]

I suggest you to use a better approach, using parent/child relationship. Create two Custom Post Types:

1. Parent post type = Main post (which display list of names)
2. Child Post Type = Names posts (which contains posts for each of the names)

Here is example of House (Parent) and Rooms (child): https://toolset.com/documentation/user-guides/creating-post-type-relationships/

3. Then create a View to list all child posts - Names with links (which is Rooms in the above example) >> And finally insert the View into your Main post (parent post).

Thank you

#528067
Screen Shot 2017-05-24 at 17.25.55.png

My situation is a dog's pedigree that a visitor completes using a cred form.
They complete the cred form with various names of a pedigree, and would not be able to put in the static url.

I don't see how it could work as a parent / child shown in your link, unless I am simply not understanding it.

In my situation they are all dogs and can not be different post types, as per the examples in your link.

I attach a screen shot of a pedigree for one post, called Layla. You will see that there are several names of dogs, some of which are repeated. There will be a post for each of those names and it is that which I want to link to, so a person can click on 'Shavit Me Shaar Hagai' and be taken to that dog's page.

By the sound of what you are saying, this is not possible?

#528318

Noman
Supporter

Languages: English (English )

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

Hello Jill,

I understand your requirements, and I also tried to look for a better workaround but could not find anything matching to your case. It would need some custom coding to make it happen. We have some recommended list of service providers here if you would like to take a look: https://toolset.com/consultant/

Have a great day,
Thank you