Jump to content

Show previous/next blog posts by category only

Recommended Posts

Posted

I have set up a blog with various articles split into categories.  I can show articles that are in specific categories with no problem, but the previous/next links at the bottom of each article link to whatever comes next in date, rather than only showing those in the same specific category.

Is there a way to ONLY have next/previous show articles in the same category. For example, I have relatively simple articles for students but also more technical ones for scientists.  Users can click on "student" or "scientist" and be presented with just those articles meant for them, but if I happen to have published a student article on 1st of the month, a science one on 3rd and another student one on 5th, the next link at the bottom of the article published on the 1st (student) shows that published on the 3rd (science), not the next student one that was published on the 5th.

  • Replies 1
  • Views 283
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Posted (edited)

The only way I have been able to accomplish this is, I group some of my posts by category and then I  adjust (fake it!) the date plublished to get them in the order I want both in the pagination and on my blog summary page. I don't display any post publishes dates . I added this code to custom css:

 .published { display: none }

Here are two examples: https://myrandomviews.com/stories/category/Four Green Walls

and this one: https://myrandomviews.com/stories/category/Eighteen Months

This one is linked to a blog post with a summary block that filters 8 posts by category, I manipulated the dates published, as I did all to get these posts in order, since it is a blog post it has pagination that exhibits other posts until you click read more on one and then the lessons show up in the pagination.  

https://myrandomviews.com/stories/lessons

Edited by derricksrandomviews

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.