Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Advanced Search
  • 0

Changing wording of the "Back to All Events" link on an event view and the URL it goes to.


MarLo56

Question

4 answers to this question

Recommended Posts

  • 1

You can add the following Javascript via Code Injection. Just edit the values of the UPDATED_TEXT and UPDATED_URL variables in the code to what you want. I went ahead and used the values you provided.

JavaScript

(function($){

  var UPDATED_TEXT = 'Back To Calendar';
  var UPDATED_URL = '/monthly-calendar';

  /*********************************************************
   * DO NOT EDIT BELOW THIS LINE
   **********************************************************/
  if(!$) {
    var s = document.createElement('script');
    s.src = 'https://code.jquery.com/jquery-3.6.0.min.js';
    s.integrity = 'sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=';
    s.crossorigin = 'anonymous';
    s.onload = init;
    document.body.appendChild(s);
  } else {
    $(document).ready(init);
  }

  function init(){
    var $backLink = $('.eventitem-backlink');
    var url = UPDATED_URL || $backLink.attr('href');
    var text = UPDATED_TEXT || $backLink.html();
    $backLink
      .html(text)
      .attr('href', url);

  }
})(jQuery);

 

Make sure the code above is in between <script></script> tags. e.g.:

<script>
  // JS code goes here
</script>

 

Edited by jpeter
Link to comment
  • 0
16 hours ago, jpeter said:

You can add the following Javascript via Code Injection. Just edit the values of the UPDATED_TEXT and UPDATED_URL variables in the code to what you want. I went ahead and used the values you provided.

JavaScript


(function($){

  var UPDATED_TEXT = 'Back To Calendar';
  var UPDATED_URL = '/monthly-calendar';

  /*********************************************************
   * DO NOT EDIT BELOW THIS LINE
   **********************************************************/
  if(!$) {
    var s = document.createElement('script');
    s.src = 'https://code.jquery.com/jquery-3.6.0.min.js';
    s.integrity = 'sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=';
    s.crossorigin = 'anonymous';
    s.onload = init;
  } else {
    $(document).ready(init);
  }

  function init(){
    var $backLink = $('.eventitem-backlink');
    var url = UPDATED_URL || $backLink.attr('href');
    var text = UPDATED_TEXT || $backLink.html();
    $backLink
      .html(text)
      .attr('href', url);

  }
})(jQuery);

 

Make sure the code above is in between <script></script> tags. e.g.:


<script>
  // JS code goes here
</script>

 

jpeter, This code was awesome and worked like a charm! Thank you so much!

Link to comment
  • 0

@MarLo56 I see some blocks on tablet doesnt look good.

You can add this to Design > Custom CSS > Then save & reload your site

/* Fix tablet posters */
@media screen and (max-width:991px) and (min-width:768px) {
div#page-section-604c098eb1aad7403ed12db2 .image-inset {
    padding-bottom: 200% !important;
}
}

image.thumb.png.3e8bd67e2e6d060565083af0fbee3169.png

Email me if you have need any help (free, of course.). Answer within 24 hours.

How to: Setup password & share url - Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care - Learn CSS - Custom Popup - Testimonial Slider

I'm Tuan, blogger/owner of a free library for children in Vietnam. Helping the community is a hobby. Contact me via email.

Link to comment

Create an account or sign in to comment

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

×
×
  • Create New...