Skip Navigation

[Résolu] Making all grid images clickable

This support ticket is created Il y a 6 années et 2 mois. 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Marqué : ,

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

Dernière mise à jour par Shane Il y a 6 années et 2 mois.

Assisté par: Shane.

Auteur
Publications
#1110230

Jas

Currently, the title in a view is the only link to the individual custom post, but it makes sense that the image should be automatically clickable/linked to the post as well. (I know I'm not the only person to say this).

Currently, due to the incompatibility issues between Divi and Toolset, most times that I go into the content template using divi builder to make a change, I end up with a randomly messed up content template which I have to re-enter the information for. Not sure if the same thing will happen if I go into the view.

Are you able to go into the view for me and make this change? Or tell me very specifically how to do that?

And may I suggest that this might be something that Toolset might want to engineer into the view in the first place? (Everyone wants to be able to click primarly the photo, and secondarily the title..)

#1110638

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jas,

Thank you for contacting our support forum.

I'm assuming that you are displaying the items with the types shortcode for the image.

To make it clickable you can wrap it in an anchor tag like this.

<a href='[wpv-post-url]'>IMAGE SHORTCODE<a>

This should add the post url to the image.

Please let me know if this helps.
Thanks,
Shane

#1111265

Jas

Hmmm, that sounds simple enough. Please don't laugh at my ignorance as a newbie here.

I see several different sections in the Views Editor. Which section am I supposed to be altering? The section I assumed it would be in, was the Loop editor? which for me looks like:

[wpv-layout-start]
[wpv-items-found]
<!-- wpv-loop-start -->
<wpv-loop wrap="3" pad="true">
[wpv-item index=1]
<div class="row ">
<div class="col-sm-4">[wpv-post-body view_template="Loop item in Search City Services CM"]</div>
[wpv-item index=other]
<div class="col-sm-4">[wpv-post-body view_template="Loop item in Search City Services CM"]</div>
[wpv-item index=3]
<div class="col-sm-4">[wpv-post-body view_template="Loop item in Search City Services CM"]</div>
</div>
[wpv-item index=pad]
<div class="col-sm-4"></div>
[wpv-item index=pad-last]
<div class="col-sm-4"></div>
</div>
</wpv-loop>
<!-- wpv-loop-end -->
[/wpv-items-found]
[wpv-no-items-found]
[wpml-string context="wpv-views"]No items found[/wpml-string]
[/wpv-no-items-found]
[wpv-layout-end]

But then there is a" Loop Item In Search for City Service" which requires opening up Divi Builder (for me) and then all it shows for image is:

{!{wpv-post-link}!}

[types field='photo' alt='%%ALT%%' title='%%TITLE%%' size='medium' align='none' resize='proportional' separator=', '][/types]

So where exactly does this go. This is what I tried (again, don't laugh-I'm already doing that myself)

<h3>{!{wpv-post-link}!}</h3>
[types field='photo' alt='%%ALT%%' title='%%TITLE%%' size='medium' align='none' resize='proportional' separator=', '][/types]

But that just made the services offered bullet points a blue link. (and the photo did attempt to redirect, but then failed)

To see example: lien caché

Thanks in advance for your patience with this newbie! Really appreciate it!

#1111574

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jas,

No worries, It seems that you have done this correctly but would it be possible for me to get access to the site to see why it's not working ?

The private fields have been enabled for your next response.

Thanks,
Shane

#1112218

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jas,

I was able to update the code with no issues at all.

Could you check and let me know if everything is ok ? Also could you let me know where you want the glypicon to show up instead of the number?

Looking forward to hearing from you soon.

Thanks,
Shane

#1113466

Jas
condition needed.png

Well glad it worked for you! Weird though that the same thing (as far as I can tell) didn't work for me.
So for the glyphicon, I don't want it to show up instead of a number; rather, I need it to NOT show up, if extra phone fields are empty.
You can see an example as per screenshot below.

The content template is where things often auto-mess-up in the html when the template is accessed, and therefore output, even when Toolset staff do it, so that you are aware. (again, this appears to be an integration issue between Divi Builder and Toolset from what other Toolset agents have determined) Maybe empty cache before you re-check the output on front-end?

thanks so much Shane!

#1114420

Shane
Supporter

Les langues: Anglais (English )

Fuseau horaire: America/Jamaica (GMT-05:00)

Hi Jas,

What you can do is to follow the instructions in the link below to help you get this done.
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/checking-fields-and-other-elements-for-emptynon-empty-values/

Please let me know if there are any issues.

Thanks,
Shane