How do i link a page to my button?

How do i link a page to my button and how do i create a page that looks like this?

https://gyazo.com/4c217b8b342adefabe05e2b4b5d7eb3a

Hi Hans,

Thank you for writing in, please inspect your Button element and find the Link setup, put the address of your page in the URL field.

Please re-upload your screenshot, I’m not seeing it or maybe it’s not accessible to us.

Cheers,

hope this link works

https://gyazo.com/0597551f112c052fa139c97dee534b03

Hi Hans,

It looks like you are using a custom button for that contact page that is outside of Cornerstone. It would be possible to link that button using Javascript but can you please send the direct link to that page so that we can check it?

Thank you.

Sure, i would like to setup something like that for my page, anyway here is the link to that contact page:

https://sparkroom.com/request-demo/

Hi Hans,

Just to clarify, the Contact Us button seems to be the submit button for the form that is on the page. If you link it to a page when it is clicked, how will the form get submitted?

But if you really want to link the button, please add this code in X > Theme Options > JS:

(function($){

	$( "#hbspt-form-1564057616334-2434732217 .hs-submit .actions .hs-button" ).on( "click", function(e) {
  		e.preventDefault();

		window.location.href = "https://sparkroom.com";
	});

})(jQuery);

Please change https://sparkroom.com in the code above to the link to the page where you want the button to link.

Hope this helps.

thank you for the help,

This is what i am trying to do with the button on my site; when someone clicks on the request a demo button, they will come to a new page with this kind of setup https://gyazo.com/0597551f112c052fa139c97dee534b031 and if they fill the columns and press contact us. The information will later be emerge to my email.

Hello Hans,

You can set up the demo button in Cornerstone adding the link to the page where they can find the form. What you need is a good contact form plugin like Contact Form 7. You will have to set it up correctly so that when the user enters some field entry, it will check the entries first and validate if it is correct. Once the entry is correct, it will be sent to your email.

Hope this explains it briefly.

How do i fix these issues?

https://gyazo.com/8828dcd4900efa2a010062fa08ac9b24

Hi Hans,

For contact form 7, in order for the form entries to be sent to your email, you will have to setup the email settings:

Please refer from here: https://contactform7.com/setting-up-mail/

And to forward the form to a page after the form was submitted, please check the instructions here:

Please install and activate the child theme and login through FTP then edit the functions.php then add this code:


add_action('wp_head', 'add_header_code');
function add_header_code(){
?>
<script>
document.addEventListener( 'wpcf7mailsent', function( event ) {
    location = 'http://example.com/';
}, false );
</script>
    <?php
};

Please change http://example.com/ with the link to the page where you want the form to be redirected.

Hope this helps.

But if i change theme to Child Theme doesn’t that erase my progress I have on the other, X pro theme? or can I run both themes at the same time?

Hello Hans,

Please do not activate the child theme yet. You will have to do the following order in activating the child theme:

  • Go to X > Validation > Theme Options Manager and download the XCS file to your local computer.
  • Go back to Appearance > Themes and then activate your newly uploaded child theme.
  • Go back again to X > Validation > Theme Options Manager and import the XCS file that you have previously downloaded. This is to make sure that your child theme will have the same settings as your parent theme.
  • Lastly, if you have made any file modifications, please make sure to note those files. Copy those files and place it in your child theme’s folder in the same order. And if you added any custom codes in your parent theme’s functions.php file, you will have to transfer those codes to your child theme’s functions.php file.

Hope this helps.

Is this correct File: XCS.php (PHP-file) And how do i make a backup?

https://gyazo.com/31ee35d6290ac6cc0f8471660770a2ea

Hey Hans,

The file you download via X > Validation > Theme Options Manager (see screenshot) should have a JSON extension and not the PHP e.g xcs.json

Once you import the XCS file you’ll see the notice as shown in your screenshot, you can simply click on Yes, Proceed button:

There are many ways to backup your site I’d recommend you to follow the official documentation on backing up a WordPress site https://wordpress.org/support/article/wordpress-backups/

Hope this helps!

I don’t have that XCS.Json File on my computer, where can i download it?

is this correct? https://gyazo.com/fb85e41214e36309b96e0f40e29c9c7f

I also have question about the Sub menus, how can i shrink the space between sub menus?

https://gyazo.com/56f624697c987a68e81f086eca532f78

Hello Hans,

Yes, that is the correct .json file. You will have to use this to import once you have installed and activated the Child theme to make sure that you have the same settings as what you have before using a child theme.

To adjust the space around the submenu, please edit your header and in the navigation inline element settings, find the “Sub Links” tab and adjust the margins and padding which may apply.

Hope this helps. Kindly let us know.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.