Hi Jen,
Thank you for getting back. Please accept my apologies for the delay in response. I really appreciate your patient.
So you want to link the “See All Articles” button to https://businessowl.co.uk/category/blog/?
Please confirm.
Regards,
Kharis
Hi Kharis,
Yes that’s right. I’d also like the Blog button on the menu to link to that page too.
Thanks,
Jen
Hi Kharis, are you able to shed any light on this?
Thanks,
Jen
Hi Jen,
Please accept my apologies for the delay in response. I really appreciate your patient.
Try replacing your Custom JavaScript:
(function($){
'use strict'
var blogButton = $('.panel-row-style:not(.my-posts-row) .latest-news-area a.all-news');
var pressButton = $('.my-posts-row.panel-row-style .latest-news-area a.all-news');
if( blogButton.length ) {
blogButton.text('See all blogs');
blogButton.attr('href', 'https://businessowl.co.uk/category/blog/');
}
if( pressButton.length ) {
pressButton.text('See all press articles');
pressButton.attr('href', 'https://businessowl.co.uk/category/press/');
}
})(jQuery);
to:
(function($){
'use strict'
var blogButton = $(':not(.my-posts-row) > .panel-grid-cell > .latest-news-area');
var pressButton = $('.my-posts-row.panel-row-style .latest-news-area a.all-news');
if( blogButton.length ) {
blogButton.text('See all blogs');
blogButton.attr('href', 'https://businessowl.co.uk/category/blog/');
}
if( pressButton.length ) {
pressButton.text('See all press articles');
pressButton.attr('href', 'https://businessowl.co.uk/category/press/');
}
})(jQuery);
Clear cache before reloading your website to see the result.
Let me know how it goes.
Regards,
Kharis
Hi Kharis,
Unfortunately when I have done this, the blog row has disappeared completely – please take a look as soon as you can so that I can revert to how it was before.
Also, clicking Blog from the menu shows all articles.
Thanks,
Jen
Hi Jen,
I am sorry for the delay.
I noticed there is a bug in newer code I suggested. Please try replacing it with:
(function($){
'use strict'
var blogButton = $(':not(.my-posts-row) > .panel-grid-cell > .latest-news-area a.all-news');
var pressButton = $('.my-posts-row.panel-row-style .latest-news-area a.all-news');
if( blogButton.length ) {
blogButton.text('See all blogs');
blogButton.attr('href', 'https://businessowl.co.uk/category/blog/');
}
if( pressButton.length ) {
pressButton.text('See all press articles');
pressButton.attr('href', 'https://businessowl.co.uk/category/press/');
}
})(jQuery);
Also, clicking Blog from the menu shows all articles.
Try replacing it with a Custom Link and enter https://businessowl.co.uk/category/blog/ for the URL.
Regards,
Kharis
You’re welcome Jen!
Please let us know in a new topic if you have any further questions, or if we can provide you with any other assistance.
Regards,
Kharis