Skip Navigation

[Resolved] I need to link types field to CPT's

This support ticket is created 5 years, 4 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 5 years, 4 months ago.

Assisted by: Minesh.

Author
Posts
#1334681
screencapture-box6189-temp-domains-hallida6-dev-shugarthms-floor-plans-davidson-2019-09-08-19_01_24.jpg

I want to create a link to new home communities available for a particular model.

Is there any documentation that you are following? Trying to research, but I may not understand the proper term.

Is there a similar example that we can see? Yes, hidden link. Look under "Available Communities" left sidebar.

What is the link to your site?hidden link

#1334741

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Do you mean that you wanted to link the post title you display within the section "Available Communities" ? If yes, View's offered the shortcode [wpv-post-link] in order to display the post title with link.

More info:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-link

#1335133

I don't believe views is what I need. The post title displayed under "Available Communities" uses the following checkbox types field: {!{types field='available-communities' separator='<br>'}!}{!{/types}!}. I need to figure out how I can make each community name under "Available Communities" a permalink to each community post. Example: Arcadia Estates in the right side bar on this page hidden link needs to link to community post hidden link which is a post type under "Communities".

This page on the live website demonstrates what I'm trying to do hidden link. Look under available communities on the left sidebar.

#1335147

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

To have such customization with Repeating field entry, you need to use [wpv-for-each] shortcode.

For example;

<ul>
[wpv-for-each field="wpcf-available-communities"]
<li> 
<a href="/communities/[title_to_slug]"> [types field="available-communities"][/types] </a>

</li>
[/wpv-for-each]
</ul>

Where you should add a custom shortcode [title_to_slug] which convert the "available-communities" value to slug using the following function and return the value
=> https://codex.wordpress.org/Function_Reference/sanitize_title

More info:
=> https://toolset.com/documentation/user-guides/repeating-fields/#Displaying%20Repeating%20Fields
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-for-each