Skip Navigation

[Résolu] Replace the the post link label

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

Problem: I would like to change the text generated by the post link shortcode.

Solution: There's no option to filter the text of the wpv-post-link shortcode, but you can use the wpv-post-url shortcode to create a custom link.

<a href="[wpv-post-url]">Edit Tournament</a>

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-url

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

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Auteur
Publications
#1273661
MyCool Site.png

Hi
I am following the toolset tutorial "Editing Existing Connections between Related Posts"
In the tutorial, the wpv-post-link appears to replace the link display label with the text "Edit this Album Track"
see the image attached.
https://toolset.com/documentation/post-relationships/how-to-build-front-end-forms-for-connecting-posts/editing-existing-connections-between-related-posts/
How do you override the [wpv-post-link] with another label e.g. Edit Tournament.
The hyperlink is correct, it is just the display label I want to replace.
Thanks

#1273677

Hi, you can change the text label by replacing the text in between the cred-relationship-form-link shortcodes that were generated automatically:

[cred-relationship-form-link form='m2m-editing-form' role_items='$fromViews' content_template_slug='editing-m2m']Edit this Tournament[/cred-relationship-form-link]
#1273873
EditTournamentView.png
EditTournaments.png

Thanks for the reply but in step 4 of the tutorial the link is on a view and we insert a relationship link.
This gets inserted as

[wpv-post-link]

rather than the format, you have suggested.
I end up with the hyperlink with a label with the name of the tournament.
see attached.
By the way, it all works correctly. I just want to change the label to something like "Edit Tournament".

#1273891

That's odd, I'm not sure why it would be inserted as wpv-post-link. That should hyperlink to the Tournament post itself, not a Form to edit the Tournament. May I log in and see how this is set up? Please show me where I can find this View on the front-end of your site.

#1273949
EditTournament_3.png
EditTournament_2.png

It's a local instance.
Here are the screenshots if I select the 2020 European Championships
On selection, you are redirected to the screen EditTournament_2.
On selecting the link on the EditTournament_2 you are sent to EditTournament_3.png which has the relationship form

#1273967

Okay so it's not a link directly to the Form, it's a link to the Tournament post. You can create a custom link to the Tournament post using the wpv-post-url shortcode:

<a href="[wpv-post-url]">Edit Tournament</a>
#1273969

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.