Real buttons in WP posts

Hi everyone,
I need to create a real button in a post.
I tried <button…> under <a hrel…> and it is not working.:mad:
Any idea will be wellcomed. :slight_smile:
Emannuel.

try to use as HTML mod button in your Editor
and can add HTML button code easy

Thanks for your quick answer.
Do you have any code example?

Hi esn003. Could you provide the full code you tried?

How are you placing this code into your posts?

Good morning Ralph,
Here is the code:

<a href="mailto:example@myemail.com?subject=~הצטרפות לרשימת תפוצה~&body=‪שמך המלא בבקשה:%20"
target=“_blank”>
<button title=“”>הצטרפות לרשימת תפוצה</button></a>

Thanks,
Emanuel.

OK, it doesn’t work to place a button element inside a <a> element like that. A button goes inside a <form> element.

All you need to do is style the <a> element to look like a button. Here’s a simple example:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Button</title>
	
<style media="all">
.button {padding: 5px 10px; background: blue; color: white; text-decoration: none; border-radius: 5px;}
.button:hover {background: red;}
</style>
	
</head>
<body>

<a class="button" href="mailto:me@myemail.com?subject=mysubject&amp;body=sometext">Click Here</a>

</body>
</html>

  1. Can you place this code in a WP post?
  2. Although I learn Latin in scool when I was young, I don’t know
    what “scientiam adquiro eundo” means. Will you tell me?

Thanks Ralph,
Emanuel.

I’m afraid I’m not familiar enough with WP to answer that, but I would think there should be a way to insert code—through some kind of editor source view. (We’ll have to wait for someone else to answer that.)

[ot]

Although I learn Latin in scool when I was young, I don’t know what “scientiam adquiro eundo” means. Will you tell me?

You are the only person ever to have asked me that. :slight_smile: I means “I learn as I go”. Or, more literally—“Knowledge I acquire while going”.[/ot]

I love “I learn as I go”.
I am a learner myself and I always was.
Yes, I managed to put that code in a WP post but I don’t like how the button looks
and I am trying to change the CSS part.
Anyway, IT WORKS and I am greatfull for that.
THANKS Ralph,
Emanuel.

Yes, it was just a quick example. If you want some help styling it, perhaps head over to the CSS forum. :slight_smile:

“scientiam adquiro eundo” works. Those who dare will succeed.:wink:
the following code works and can be placed in any post.

<input style=“width: 200px; height: 24px;” onclick=“subscription_request();”
type=“button” value=“Send subscription request” size=“17” />

<script type=“text/javascript” language=“javascript”>// <![CDATA[
function subscription_request(){
send_it = “mailto:your_account@your-provider.com?subject=~Subscription request~&body=Your full name please:”;
document.location = send_it;
}
// ]]></script>

Thank you for your help and inspiration.:slight_smile:
Emanuel.