Skip Navigation

[Resolved] Build a post grid with custom link.

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

Problem:
Build a post grid with custom link.

Solution:
You can use the conditional block to display the content conditionally.
- https://toolset.com/course-lesson/using-toolset-conditional-block/

You should try to wrap your image block within conditional block and set the conditional statement as required and display the image block.

Relevant Documentation:

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

Last updated by christophS-4 3 years ago.

Assisted by: Minesh.

Author
Posts
#2242387
Bildschirmfoto 2021-12-11 um 15.23.38.png

Tell us what you are trying to do?
I want a post grid with custom link. Like a seller list with logo and link on there page.

There
hidden link
u see the logos.
This is a post grid with displaying the company logos, the images are the featured images of the post type.
No i made a custom url-field for the post.
Now in the frontend the logos should link in a new tab to the company (url from the custom field)
BUT if the field is empty it should dont link anywhere.

With the view i made i have this problems:
- Link is not in new Tab/Window
- If the url is empty it links on it selfs so its bad for UX

What is the link to your site?
hidden link

#2243165

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

You can use the conditional block to display the content conditionally.
- https://toolset.com/course-lesson/using-toolset-conditional-block/

You should try to wrap your image block within conditional block and set the conditional statement as required and display the image block.

When you use Toolset image block, it will offer you to set the link and setting if you want to open the link in the new tab. Please check the following screenshot: hidden link

#2243327
Bildschirmfoto 2021-12-13 um 10.13.22.png
Bildschirmfoto 2021-12-13 um 10.13.17.png

Just for checking this work but is this the common way?
i made 2 conditions .
one if empty the image displays.
if not empty the image displays with dynamik link to custom field.

#2243347

Minesh
Supporter

Languages: English (English )

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

yes - thats the correct way 🙂

#2243349

My issue is resolved now. Thank you!