Latest News button linking to oldest post?

Hello.

I’ve noticed that if I don’t set a static page for my Blog (Settings > Reading > Front Page Displays) the button on the ‘Latest News’ widget defaults to my oldest blog post?

I’ve set up a Blog page using a template and I’ve used a Post Loop to pull the required Post information, which works. I’ve built the Blog page this way so I could add in extra content to the page and style it accordingly. I didn’t want to use the standard Wordpress Blog default layout as it is too restrictive.

Is there a way to ensure the button is pointed at my Blog and not to the last post?

The page isn’t currently available online as I’m building it on a local server.

Any help would be very much appreciated!

Thank you in advance.

Gaz

Hello Gaz,

I am sorry for the inconvenience. This issue should be fixed in the next update. To temporarily fix it, try to do the below steps:

  1. Install and activate the TC Custom JavaScript plugin
  2. Go To Appearance > Custom JavaScript
  3. Paste the following code into the provided box

;(function($) {

   'use strict'

   if( $('.widget_sydney_latest_news').length ) {
      var postsURL = 'http://yoursite.com';
      $('.more-button').attr('href', postsURL);
   }

})(jQuery);

Replace http://yoursite.com in the code above to your posts URL.

  1. Update

Regards,
Kharis

Hi Kharis,

Really appreciate the swift response.

That has worked perfectly, thank you. And, yes please, if this could be addressed in a future update that would be great; don’t want to keep adding more plugins, if not necessary. :o)

I shall mark this as resolved.

Cheers,

Gaz