Skip Navigation

[Resolved] How to generate a clickable link based on a search custom post title?

This support ticket is created 3 years, 9 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 2 replies, has 2 voices.

Last updated by stephaneM-4 3 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1703781

In a Custom post field I have a list of cities with a unique ID title.

In each custom post I have 10 custom fields that contain the title of other custom posts for cities that I would like to display on the page.

A: I would like to know how to display the title of a custom post: display the url of the custom post that corresponds to the title in my custom post field.
B: I'd also like to get the title of a custom post: Retrieve a value from a custom field that is in the custom post, always looking for the value through the title of the custom post which is the unique identifier.

The goal is to create for each city a links urls that allows to display thanks to the title of another city to generate a link with :
<a href="A: URL of the post thanks to the title which is in a Custom field">Go to the city "B: The name of the city thanks to the title which is in a Custom field</a>

Thank you for your response

#1704377

Hello, unfortunately there's not a simple way to set up this type of filter for a View using the Blocks Editor because it requires the use of shortcode attributes in a View filter. We're working to achieve parity in the Blocks Editor with the legacy Views system, but this feature isn't implemented just yet. One way you could achieve something similar in Blocks is to add a custom taxonomy to these posts, and use terms to "relate" the posts you want to display together. Then you could use a taxonomy term Query Filter to display the "related" posts (not Toolset post relationships, but related by taxonomy term).

#1708191

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.