Call To Action button to a new separated page

Hi there,

Could you tell me how to make when visitors clicking on the call to action button and a new separated page comes up?

Https://petsittingdiary.com is my website. I used many call to action buttons on my webpages. But I just want some of them have that function. For example, the section “WHAT OUR CLIENTS SAY” on https://petsittingdiary.com/our-services/cat-sitting/. There is a “READ MORE” call to action button. When clicking on it, it will direct the visitor to the facebook page rating section directly. But I don’t want the visitor leave my webpage. I want a separated page comes up. Can I do it?

Sorry for a long paragraph. I hope I can describe it understandably.

Thanks!

Regards,
WL

Hello there,

Based on my understanding, you’d like to apply a popup window for the “READ MORE” button in this page. You’d follow these steps:

  1. Install and activate the Simple Popup plugin
  2. Install and activate the TC Custom JavaScript plugin
  3. Go To Appearance > Custom JavaScript
  4. Paste the following code into the provided box
    (function($){

      if( $('#pg-2770-5 .roll-button').length ) {
        $('#pg-2770-5 .roll-button').attr('onclick', 'return popitup(this.href, 600, 600)');
      }

    })(jQuery);

5 . Update
6 . Clear any applied cache. Otherwise the new code addition won’t take effect

Regards,
Kharis

Thanks Kharis! It works perfectly! But I have more than 1 page that wants to add this function. How can I add this function to other pages’ button as well?

Hello there,

In the page editor, edit the respective widget. Then add a custom class name to Widget Styles > Attributes > Widget Class. For example: has-popup-link

Then replace the code I’ve suggested with this one:

    (function($){

      if( $('.has-popup-link .roll-button').length ) {
        $('.has-popup-link .roll-button').attr('onclick', 'return popitup(this.href, 600, 600)');
      }

    })(jQuery);

Regards,
Kharis