• Resolved JenniferCross

    (@jennifercross)


    Hi Kharis and Roman,

    I hope you are both well.

    I wonder if you can help.

    I have separated out my blogs into 2 categories, ‘Blogs’ and ‘In the Press’.

    On the homepage, underneath the 3 latest of each, there is a button saying ‘See all articles’ however this is just linking to the homepage. Please can you let me know how the ‘See all articles’ underneath the 3 blogs can link to a page will all articles in the blog category, and how the button underneath the ‘In the Press’ articles can link to a page showing all of the articles in the ‘In the Press’ category?

    I look forward to hearing from you.

    Many thanks,
    Jen

    The page I need help with: [log in to see the link]

Viewing 8 replies - 16 through 23 (of 23 total)
  • 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

    Thread Starter JenniferCross

    (@jennifercross)

    Hi Kharis,

    Yes that’s right. I’d also like the Blog button on the menu to link to that page too.

    Thanks,
    Jen

    Thread Starter JenniferCross

    (@jennifercross)

    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

    Thread Starter JenniferCross

    (@jennifercross)

    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

    Thread Starter JenniferCross

    (@jennifercross)

    Perfect, thank you!

    Jen

    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

Viewing 8 replies - 16 through 23 (of 23 total)
  • The topic ‘Linking to ‘See all articles’’ is closed to new replies.