Change of Link for "See Blog" button

Hi Support,

I am seeking an clarification from you confirm whether allow me to change the link for “See Button” in the Latest News Section"? And how to change it if possible?

For example:
I want to button to Link to http://domain.name/blog instead of current setting link to post blog.

Please advice.

Hey there,

Thanks for your message to Support.

You may use the following jQuery Snippet to change the URL of this button without losing this customisation when the theme is updated.


jQuery(document).ready(function() {
    jQuery('#latest-news .latest-news-button, a.button').each(function() {
        this.href = 'http://www.google.com/';
    });
});

You will be required to install the Insert Headers and Footers plugin and then add the following snippet above.

​Please let us know if there’s anything else we can do to help.

Regards,
Support

Hi Support,

I had install “Insert Headers and Footers” Plugin and there are two setting in the setup, “Scripts in Header” and “Scripts in Footer”. I based on your suggestion by paste the script in both section but it does not work as said.

Kindly assist.

Thanks in advance.

Hey again,
Thanks for keeping in touch with us.

Apologies, I forgot to wrap the code in script tags. Here’s the corrected code:


jQuery(document).ready(function() {
    jQuery('#latest-news .latest-news-button, a.button').each(function() {
        this.href = 'http://www.google.com/';
    });
});

I hope this helps :slight_smile:

Best Regards,
Support.

Hi Support,

May I know what is the different between the 1st code you gave me and 2nd code that you gave. I did not see any different between these two code. Without ado, i suppose the result will be the same (not work).

Kindly advise.
Thank you.

Hi there,
Thanks for keeping in touch with us.

Sorry about that. For some reason, the code field is hiding the script tags.

I’m just going to go ahead and drop the code here without the code formatting:

< script >
jQuery(document).ready(function() {
jQuery(’#latest-news .latest-news-button, a.button’).each(function() {
this.href = ‘http://www.google.com/’;
});
});
< /script >

Just remove the spaces in the script tag, that’s the only way I could get the script tags displayed.

So sorry about that.

Please let me know if there are any more questions that I may answer for you :slight_smile:

Best Regards,
Support