Skip Navigation

[Resolved] Shortcode as link in toolset button

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.

Tagged: 

This topic contains 26 replies, has 2 voices.

Last updated by Shane 9 months ago.

Assigned support staff: Shane.

Author
Posts
#1821541

Shane
Supporter

Languages: English (English )

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

Hi Tomer,

Have a look here.
hidden link

As you can see i've styled the delete link like a button using the tutorial here
hidden link

The css that was used is.

.cred-refresh-after-delete{
 box-shadow: 0 5px 0 darkred;
background-color: red;
  color: white;
  padding: 1em 1.5em;
  text-decoration: none;
  text-transform: uppercase;
}
.cred-refresh-after-delete:hover {
  background-color: #555;
}

.cred-refresh-after-delete:active {
  background-color: black;

}

.cred-refresh-after-delete:visited {
  background-color: #ccc;
}

This can be found in the css editor section of the content template.

Please let me know if this helps.
Thanks,
Shane

#1822203

Danke.
Das funktioniert nun.

Mein Fehler war, dass ich nicht den CSS-Code der Klasse "cred-refesch-after-delete" angepasst habe, sondern eine zusätzliche Klasse erstellt habe.

Noch zwei Fragen:
1. Wie kann ich Icons einbinden?
2. Kann der CSS-Code auch dokumentenübergreifend verwendet werden?

#1822895
buttons.jpg

Hi

I have the optics almost the same now.

Deviation 1: Vertical alignment
Deviation 2: Icon is missing

Another problem: I covered the grid with an orange background color for better alignment. I can't get this color off now.

see hardcopy

#1824917

Shane
Supporter

Languages: English (English )

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

Hi Martin,

Can you send me a link to the page in your screenshot so that I can have a look ?

Thanks,
Shane

#1825269

Hi,

it is still the layout template that you had customized

hidden link

#1825275

I just adjusted your css and moved the button to where it should go

#1825321

Shane
Supporter

Languages: English (English )

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

Hi Martin,

Add this to the css that I provided.
margin-top: 5px;

For the missing icon, there isn't one because none was added.

Any icon that is added will need to be added using css, have a look at this example below.
https://stackoverflow.com/questions/26441380/using-css-before-to-add-a-small-icon-before-list-links

Please let me know if this helps.
Thanks,
Shane

#1827799
narrow window.jpg
big window with margin-top is ok.jpg

I had tried that too. But unfortunately it is not the same as with the other buttons.
When the window is made smaller, the upper space is still there, while it is not there for the "original buttons".
See image.

#1827817

That with the icon is also cumbersome.
Is there really no other way to delete a post using a "normal" toolset button?

#1828573

Shane
Supporter

Languages: English (English )

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

Hi Martin,

Is there really no other way to delete a post using a "normal" toolset button?

Based on our documentation below you can use the "type" attribute to change it from an anchor tag to a button tag.
https://toolset.com/documentation/programmer-reference/forms/cred-shortcodes/#cred-delete-post

Perhaps this will help. If you need further clarification please let me know.

Thanks,
Shane

#1831329

Hi, Shane,

but that's exactly the problem.
Unfortunately, the button tag of the Cred-Delete does not have the same look and options (e.g. icons) as the toolset button blocks.
And that brings us back to the beginning of this ticket.

#1832015

Shane
Supporter

Languages: English (English )

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

Hi Martin,

Which is why this a purely css solution, so the button itself will need to be styled to match your other buttons. The next thing is you can add the icon using css as well
hidden link

Apart from this there is not much else we can do to resolve this one.

Please let me know if this helps.
Thanks,
Shane