Passer la navigation

[Résolu] Adding target="_blank" attribute to [wpv-post-excerpt] shortcode

This support ticket is created Il y a 3 years, 2 months. 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Fuseau horaire du supporter : Asia/Hong_Kong (GMT+08:00)

Ce sujet contient 1 reply, a 2 voix.

Dernière mise à jour par Luo Yang Il y a 3 years, 2 months.

Assisté par: Luo Yang.

Auteur
Publications
#2582785

Tell us what you are trying to do?
When people click on the 'Read more >>' link in an excerpt I would like the link to open in a new browser tab.

Is there any documentation that you are following?
The wpv-post-excerpt] shortcode does not appear to support the option to add target="_blank" attribute.

I don't see any mention of being able to add this function here: https://toolset.com/documentation/programmer-reference/views/views-shortcodes/#wpv-post-excerpt

One idea I tried unsuccessfully was to add this js to that individual (organizations) archives page: https://toolset.com/forums/topic/how-to-set-target_blank-for-wpv-post-edit-link/

Is there a similar example that we can see?

What is the link to your site?
lien caché

My concern is after people do a search and view a record after clicking the 'read more' link in the excerpt, it is not intuitively apparent to the user if they hit their browser back button if it will take them to their previously created filtered page or back to the main /orgs/ directory. In fact it does take them to the filtered page, and since this is the case, how would I add a js '< Back' link e.g. with <p>lien caché</p> so that it appears only in the top of every page that one visited from a filter/search page?

Thanks for any guidance!

#2582845

Hello,

You can setup the 'more' attribute with HTML codes, for example:

[wpv-post-excerpt length='10' count='word' more='<em><u>lien caché</u></em>']