ChiroUp Posted March 24, 2022 Share Posted March 24, 2022 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
tuanphan Posted March 26, 2022 Share Posted March 26, 2022 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 Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
noahawaii Posted March 27, 2022 Share Posted March 27, 2022 (edited) 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 March 27, 2022 by noahawaii Link to comment
tuanphan Posted March 29, 2022 Share Posted March 29, 2022 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> noahawaii 1 Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
ChiroUp Posted March 30, 2022 Author Share Posted March 30, 2022 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
tuanphan Posted April 1, 2022 Share Posted April 1, 2022 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 Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
julia1 Posted June 17, 2022 Share Posted June 17, 2022 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
tuanphan Posted June 17, 2022 Share Posted June 17, 2022 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 Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
TomBatch Posted June 12, 2023 Share Posted June 12, 2023 Hey @tuanphan I would love this on my site, but I am struggling to find the code too. I would love the Author link to link back to https://www.batchcoffee.co.uk/tom-saxon-coffee-expert Here is my site and blog: https://www.batchcoffee.co.uk/stories THanks :) Tom. Link to comment
tuanphan Posted June 13, 2023 Share Posted June 13, 2023 18 hours ago, TomBatch said: Hey @tuanphan I would love this on my site, but I am struggling to find the code too. I would love the Author link to link back to https://www.batchcoffee.co.uk/tom-saxon-coffee-expert Here is my site and blog: https://www.batchcoffee.co.uk/stories THanks 🙂 Tom. You mean change all author on this page to above link? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
TomBatch Posted June 13, 2023 Share Posted June 13, 2023 To be honest there is only one author. So I will change it shortly so all the blogs are written by 'Tom Saxon - Coffee Expert'. I would then like the link to go to: https://www.batchcoffee.co.uk/tom-saxon-coffee-expert instead of: https://www.batchcoffee.co.uk/stories#:~:text=Tom Saxon - Coffee Expert Link to comment
tuanphan Posted June 14, 2023 Share Posted June 14, 2023 23 hours ago, TomBatch said: To be honest there is only one author. So I will change it shortly so all the blogs are written by 'Tom Saxon - Coffee Expert'. I would then like the link to go to: https://www.batchcoffee.co.uk/tom-saxon-coffee-expert instead of: https://www.batchcoffee.co.uk/stories#:~:text=Tom Saxon - Coffee Expert Add to Last Line in Code Injection > Footer <script> $(document).ready(function() { setTimeout(function(){ $('a.Blog-meta-item--author').attr('href','https://www.batchcoffee.co.uk/tom-saxon-coffee-expert'); }, 2000); }); </script> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
TomBatch Posted June 14, 2023 Share Posted June 14, 2023 Thanks so much for your response. However, it doesn't seem to work. The link is still as it was. Link to comment
tuanphan Posted June 16, 2023 Share Posted June 16, 2023 On 6/14/2023 at 6:59 PM, TomBatch said: Thanks so much for your response. However, it doesn't seem to work. The link is still as it was. I see it changed here. Try checking again Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
TomBatch Posted June 20, 2023 Share Posted June 20, 2023 Sorry about this. So for me it does work after I have refreshed it about 3 times. Any idea why this is? Link to comment
tuanphan Posted June 22, 2023 Share Posted June 22, 2023 On 6/20/2023 at 5:25 PM, TomBatch said: Sorry about this. So for me it does work after I have refreshed it about 3 times. Any idea why this is? Try Design > Site Styles > Disable Ajax Loading Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
TomBatch Posted June 22, 2023 Share Posted June 22, 2023 Yeah, I did try that and it does work on the blog list page, however not so great on individual blog pages. I would prefer to keep Ajax loading on as I have some pretty large blog posts. Is there a work around with this? Thanks again 🙂 Link to comment
tuanphan Posted June 23, 2023 Share Posted June 23, 2023 23 hours ago, TomBatch said: Yeah, I did try that and it does work on the blog list page, however not so great on individual blog pages. I would prefer to keep Ajax loading on as I have some pretty large blog posts. Is there a work around with this? Thanks again 🙂 You try creating a new thread. I am not very familiar with Ajax Code. Hope someone can rewrite that code to work with Ajax Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
simon.stjohn Posted July 8, 2023 Share Posted July 8, 2023 I'd just like to add a thanks to @tuanphan for this solution which works perfectly for me! Another awesome help for the community.... tuanphan 1 Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment