Jump to content

Textlink into a button - event excerpt

Recommended Posts

Posted

If button same link as title, you can add this code into Design > Custom CSS

.eventlist-title .eventlist-title-link:after {
    content: "Read More";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    top: -50%;
    background-color: black;
    max-height: 50px;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    font-size: 16px;
}

If different, please enable text link in excerpt, then we can give code to turn text link to button easier

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 6 months later...
Posted
On 9/8/2022 at 1:20 PM, MSalas said:

Tuanphan - love to follow up on this, I tried pasting in the code but it resulted in the button floating over my excerpt text. 

https://www.salastina.org/concerts

 

Thank you!

Try this new code

.eventlist-title .eventlist-title-link:after {
    content: "Read More";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: black;
    max-height: 50px;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    border-radius: 10px;
    color: white;
    font-size: 16px;
}

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 4 weeks later...
Posted

Hi @tuanphan 🙂

I could not see how to turn the excerpt into a link to the event (for now its just the title and graphic which is causing some confusion). Do you know if this is possible?

I also tried using the code above to make a button for "event info" but it fails if the except is too long and also in mobile view.
 

Here is a link to our site: https://www.dromtaberna.com/

Thank you again,
Paula

 

Posted
On 10/5/2022 at 1:41 AM, singthegreys said:

Hi @tuanphan 🙂

I could not see how to turn the excerpt into a link to the event (for now its just the title and graphic which is causing some confusion). Do you know if this is possible?

I also tried using the code above to make a button for "event info" but it fails if the except is too long and also in mobile view.
 

Here is a link to our site: https://www.dromtaberna.com/

Thank you again,
Paula

 

Yes. If excerpt too long, it will caused problem. You can reduce excerpt length

or add link manually on excerpt.

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

  • 1 year later...
Posted
On 9/8/2022 at 2:20 AM, MSalas said:

Tuanphan - love to follow up on this, I tried pasting in the code but it resulted in the button floating over my excerpt text. 

https://www.salastina.org/concerts

 

Thank you!

@MSalas Hi, I noticed that you ended up changing the button to say 'tickets and event info' instead of adding a separate tickets button. How did you do this? 

Thanks! 

(or if anyone else knows how I might achieve this please let me know!) 

Posted
On 8/16/2024 at 11:06 PM, User1776 said:

@MSalas Hi, I noticed that you ended up changing the button to say 'tickets and event info' instead of adding a separate tickets button. How did you do this? 

Thanks! 

(or if anyone else knows how I might achieve this please let me know!) 

To rename button text, use this code to Website Tools > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
    $(".eventlist-button").html(function() { 
          return $(this).html().replace("View Event", "tickets and event info");  
    });
});
</script>

 

Email me if you have need any help (free, of course.). Answer within 24 hours. 
Or send to forum message

Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.