Skip Navigation

[Gelöst] Shortcode as link in toolset button

This support ticket is created vor 4 Jahren, 1 Monat. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 26 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von Shane vor 4 Jahren.

Assistiert von: Shane.

Author
Artikel
#1809057
Link im frontend.jpg
processing in the template.jpg

How can I use a shortcode in the link of a toolset button?
if I simply insert this, the url of the current page will always be placed in front of you.
Example see pictures.

#1811529

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Martin,

Thank you for getting in touch.

Unfortunately you won't be able to do this.

A workaround is to check on the frontend what is the class that is generated for the cred shortcode and then use CSS to style this in the form of a button.

I would suggest having a look at the link below.
versteckter Link

Thanks,
Shane

#1811633
genereted link.jpg
after cklick.jpg

You are advertising: "no coding"!

I have understood how I can "recreate" the button with css.
But how do I get this shortcode as a link (href) in the button?

This doesn't work (see pictures):
<p>Löschen</p>

#1812513

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Martin,

This is no coding because we generate a Link. If you need to style that link you will need to use some HTML and CSS.

Secondly here

<p><a href="[cred_delete_post_link action="trash" text="Löschung %TITLE%" message="Sind Sie sicher, dass dieses Mitglied gelöscht werden soll?" message_show="1" redirect='1215' class="cred-refresh-after-delete"]">Löschen</a></p>

You aren't able to add the shortcode into the anchor tag as a link because the shortcode already generates the link in an anchor tag.

What you should be doing is this.

[cred_delete_post_link action="trash" text="Löschung %TITLE%" message="Sind Sie sicher, dass dieses Mitglied gelöscht werden soll?" message_show="1" redirect='1215' class="cred-refresh-after-delete"]

I see you have the class "cred-refresh-after-delete"

You can Style you link by using this class with css.

Please let me know if this is a bit clearer for you.

Thanks,
Shane

#1813041

Hello,
i understood why i can't put a shortcode in an a-tag.

i have had some experience with css, but i don't know how to use this in toolset. That's why I don't understand what you mean by your second sentence.

If you can give me an example or a turtorial, I would be grateful.

#1813895

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Martin,

The link below should provide a tutorial on how to convert an Anchor tag into a button.
versteckter Link

However I need a little more information on where you are adding the cred shortcode. Is it in a view or a content template?

If it is they should both have a custom css tab, if you let me know where you are adding it I can say exactly where to find the custom css section.

#1814413
advanced.jpg

How to create an anchor-tag with css is not the problem.
I also know where I can find the CSS option in Pages, Layouts and Vies.
But there I can only enter the class name (see picture).

Where do I define the content of the class??

#1815511

I have now found it myself. CSS is defined in the document and not in the block.

Can I also use the CSS code across documents?

#1815547
test-css.jpg

My basic problem is this:
In a frontent template I want several buttons that should look the same (new post, edit post, delete post).
For new post and edit post, I can use the toolset button, as a URL link works here. Only shortcode works for delete post.

Therefore I would like to recreate the appearance of the button for the shortcode [cred-delete-post].

That's why I used css, which also works with plain text. I assigned the same css to [cred-delete-post], but unfortunately it doesn't work here (see picture).

How can I make the button for delete post look the same as the other buttons (include icon)?

#1818221

Hello,
When can I expect an answer? with other tickets this only took one day!

#1819031

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Martin,

I must apologize for the delay in response as we are currently short staffed and experiencing a high volume of tickets.

What you can do is to allow me to have admin access to this page and I can setup a quick example for you to follow to get this resolved.

I've enabled the private fields for your next response.

Thanks,
Shane

#1819449

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Martin,

Can you make the user an admin user as i'm not able to edit or check on your views with this user role.

Thanks,
Shane

#1820877

Hi Shane,

excuse me. I forgot to adjust the role.

Now is it "Administrator"

#1821173

Shane
Supporter

Sprachen: Englisch (English )

Zeitzone: America/Jamaica (GMT-05:00)

Hi Martin,

Thanks, its now an admin role however i'm seeing where our Forms plugin isn't on the site.

I've tried to download and install it but it's saying the folder already exists on your server so i'm unable to reinstall.

Can you log into the site using FTP and either delete the existing cred-frontend-editor folder or install the Forms plugin for me.

Once we've got forms installed and active we can proceed to styling the link as a button.

Thanks,
Shane

#1821519

Hi Shane,

I don't understand why cred-forms was no longer installed. I had already created forms with it.
I've now reinstalled and activated it.