Links to posts from a category while on that category page. (4 posts)

  1. GaryManners
    Posted 3 years ago #

    I'm trying to have it so when I'm on a category page the links in the sidebar are to other pages only from that category and I want to be able to reuse the sidebar template for each instance.
    So, say I'm on the page .../category/books the sidebar should list all posts only from that category and when I'm at the page ../category/films I see a menu only for the posts in the category films.
    I suppose one solution would be to hard code each category into several sidebars but that would be cumbersome and the user would not be able to create any new categories without me setting up the back end. I need a dynamic solution.

    I want the code in the sidebar to be able to detect which category page is being displayed and I'm not sure if php can do that on it's own or if I'd need some kind of javascript/jquery interface to do that.
    Any help would be fantastic.

  2. GaryManners
    Posted 3 years ago #

    I forgot to add that these category pages are set to display only one post.

  3. Michael
    Part-Time Forum Moderator
    Posted 3 years ago #

    have a look through the 'related posts' plugins:


  4. GaryManners
    Posted 3 years ago #

    Thanks alchymyth. I hadn't thought of searching the plug-in directory for 'related posts'
    However, I just tried out about five of these related post plugins, which claimed to have settings for categories, and none of them were able to specifically do what I'm looking for.
    The search continues.

Topic Closed

This topic has been closed to new replies.

About this Topic