Jump to content

Changing Blog Author Link

Recommended Posts

Site URL: https://chiroup.com/

Right now when you click on the authors of my blogs it redirects to our blog home page. I'm wanting to change the link to something else. I have 2 main authors. And these are the links I want to change them to. Let me know thanks!

Blog post with Tim Bertelsman: https://chiroup.com/blog/7-new-skills-for-carpal-tunnel-syndrome | Author link should be: https://chiroup.com/dr-bertelsman

Blog post with Brandon Steele: https://chiroup.com/blog/chiropractic-evaluation-of-neurologic-heel-pain | Author link should be: https://chiroup.com/dr-steele

Link to comment

Try adding this code to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('a.blog-author-name[href*="851a68"]').attr('href','/dr-bertelsman');
  	$('a.blog-author-name[href*="851a6a"]').attr('href','/dr-steele');
});
</script>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 3/25/2022 at 8:35 PM, tuanphan said:

Try adding this code to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('a.blog-author-name[href*="851a68"]').attr('href','/dr-bertelsman');
  	$('a.blog-author-name[href*="851a6a"]').attr('href','/dr-steele');
});
</script>

 

How do you make this open up in a new tab? 

target="_blank"  

This doesnʻt seem to work no matter where I paste it in. My link is already supposed to be a redirect into a new tab but it doesnʻt work, and I canʻt get this to work either.

Thanks

Edited by noahawaii
Link to comment
On 3/27/2022 at 2:39 PM, noahawaii said:

How do you make this open up in a new tab? 

target="_blank"  

This doesnʻt seem to work no matter where I paste it in. My link is already supposed to be a redirect into a new tab but it doesnʻt work, and I canʻt get this to work either.

Thanks

Try this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
   setTimeout(function(){
            	$('a.blog-author-name[href*="851a68"]').attr('href','/dr-bertelsman');
  	$('a.blog-author-name[href*="851a6a"]').attr('href','/dr-steele');
     $('a.blog-author-name').attr('target','_blank');
         }, 2000);
});
</script>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
On 3/26/2022 at 1:35 AM, tuanphan said:

Try adding this code to Settings > Advanced > Code Injection > Footer

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
	$('a.blog-author-name[href*="851a68"]').attr('href','/dr-bertelsman');
  	$('a.blog-author-name[href*="851a6a"]').attr('href','/dr-steele');
});
</script>

 

This worked for the top of the post where it says "written by" but when you click on the profile picture at the bottom of the blog it still takes you to the blog page.

Link to comment
On 3/31/2022 at 3:03 AM, ChiroUp said:

This worked for the top of the post where it says "written by" but when you click on the profile picture at the bottom of the blog it still takes you to the blog page.

Ah, I didn't notice profile picture on the bottom

Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
   setTimeout(function(){
            	$('a.blog-author-name[href*="851a68"], .blog-item-author-profile-wrapper a[href*="851a68"]').attr('href','/dr-bertelsman');
  	$('a.blog-author-name[href*="851a6a"], .blog-item-author-profile-wrapper a[href*="851a6a"]').attr('href','/dr-steele');
     $('a.blog-author-name, .blog-item-author-profile-wrapper a').attr('target','_blank');
         }, 2000);
});
</script>

 

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
  • 2 months later...
On 4/2/2022 at 1:24 AM, tuanphan said:

Ah, I didn't notice profile picture on the bottom

Use this new code

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function() {
   setTimeout(function(){
            	$('a.blog-author-name[href*="851a68"], .blog-item-author-profile-wrapper a[href*="851a68"]').attr('href','/dr-bertelsman');
  	$('a.blog-author-name[href*="851a6a"], .blog-item-author-profile-wrapper a[href*="851a6a"]').attr('href','/dr-steele');
     $('a.blog-author-name, .blog-item-author-profile-wrapper a').attr('target','_blank');
         }, 2000);
});
</script>

 

Hi @tuanphan - very interested to implement this as well, although this code is not working for me.

I think it may be the 'blog-author-name' - where do I get this unique code from? I've tried using the code at the end of the URL that's linked from the profile pic and name, but it's much longer: '61b6b8c8a521551d9947b0a6'

Site: www.southsidelegal.com.au

Link to comment
54 minutes ago, julia1 said:

Hi @tuanphan - very interested to implement this as well, although this code is not working for me.

I think it may be the 'blog-author-name' - where do I get this unique code from? I've tried using the code at the end of the URL that's linked from the profile pic and name, but it's much longer: '61b6b8c8a521551d9947b0a6'

Site: www.southsidelegal.com.au

Can you share link to a blog post?

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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...

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.