Sauter la navigation

[Résolu] Build a post grid with custom link.

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 3 années. 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)

Ce sujet contient 4 réponses, a 2 voix.

Dernière mise à jour par christophS-4 Il y a 3 années.

Assisté par: Minesh.

Auteur
Publications
#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
lien caché
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?
lien caché

#2243165

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: 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: lien caché

#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

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

yes - thats the correct way 🙂

#2243349

My issue is resolved now. Thank you!