Archived topic
buttons in elements
12 replies · Started by Steven on March 30, 2021
Hi there,
I was wondering if you could please help me figure out how to add a link to the buttons (so they actually go somewhere when you click them) on my header elements, and how to round the edges of these same buttons (40 degrees).
Here is the html I have for both headers:
<h1 class="hero-headline">work + life, organized</h1>
<h2>simple systems to manage work and life in parallel</h2>
speak with an organizing consultant
and the other:
<h1 class="hero-headline">stop surviving, start thriving</h1>
<h2>our organizing experts can show you how</h2>
schedule a call
Thank you in advance
Hi there,
Looks like you've figured out?
I see the "speak with an organizing consultant" button working to smooth scroll down to the section below.
Also, I'd highly recommend building that entire hero section with GenerateBlocks as the first section of that page. That way you will have complete control over all the elements in there including the button without writing any CSS.
Let me know if this helps :)
No I don't have it figured out, the redirecting came from the original theme, how can I redirect to another page?
Yes I tried rebuilding but I didn't see an option to have the merged menu the way I have it here.
When I try to rebuild the section under Generate Press > Appearance > Elements > Choose Element type:
block
header
hook
layout
I selected the header because that is what the original section is, but when selecting that one it does not give me more design control it is essentially the same as the original which requires coding
When I select the block option it gives me more control but I don't see the option for the merged header.
What am I missing?
You would just need to edit the href property in the HTML:
<a href="#intro" class="smooth-scroll button ghost">speak with an organizing consultant</a>
You can try this CSS to round the edges of the buttons:
.page-hero .ghost.button {
border-radius: 40px;
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
Let me know if this helps :)
Hi there,
Unfortunately adding the code didn't do anything.
I am trying to fix 2 ghost buttons:
https://lifeandworkflow.com/?v=7516fd43adaa
https://lifeandworkflow.com/services/?v=7516fd43adaa#intro
Most importantly I need to be able to redirect those buttons to specific pages. How can I do that?
Thanks
Unfortunately adding the code didn’t do anything.
I'm not seeing the code added. Can you clear and disable your caching plugin first?
https://www.screencast.com/t/IDkxXRhDk0S
Most importantly I need to be able to redirect those buttons to specific pages. How can I do that?
Have you tried replacing the href value as suggested above? For example, you can replace #intro with https://www.google.com/
See more info here: https://www.w3schools.com/tags/tag_a.asp
I have added the CCS using "Custom CSS Plugin"
Cleared the cache did not make a difference
Yes, the link works now thank you! but how can I make it open in a separate tab, not the same window?
I edited the code here:
https://generatepress.com/forums/topic/buttons-in-elements/#post-1715700
but how can I make it open in a separate tab, not the same window?
This should help:
https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_link_target
The buttons have rounded edges, so thank you for that!
I am still having a hard time opening the link in a separate tab, how to apply the target="_blank" within the code in element? I have pasted below what I have in that section, but I don't how to tweak it to implement the elements the code sample you provided:
<h1 class="hero-headline">work + life, organized</h1>
<h2>simple systems to manage work and life in parallel</h2>
<a href="https://calendly.com/theneatniche">speak with an organizing consultant</a>
Have you tried adding target="_blank" right after the href="https://calendly.com/theneatniche" as the example here?
That did it thanks! Those of us who don't know codding sometimes need a little more details as to where to add code snippets :)
No problem :)