Category content

Last changed: November 10, 2012 Comments: 50

This WordPress plugin (widget) will be shown when visitors are viewing a single post, category page or both. Otherwise, it wont be there at all.
The widget contains a list of post titles from the same category(s) the visitor is viewing the post from, so the visitor is able to swiftly change posts by clicking on the titles shown.
Posts published in multiple categories are taken care of just fine. I’ve introduced a new feature in version 1.6 which gives you the possibility to show all the categories the post has been published in or the category where the visitor has been spotted the last time(uses cookie).

The widget can be controlled with the following widget options:

  • Title (before the category name(s))
  • Exclude category(s) by ID
  • Exclude categories on: Single, Category, Both, None
  • Sticky posts on top: Yes | No
  • Show posts from year: a specific year or all years
  • Show widget on: categories | single posts | both
  • Show category title(s): Yes | No
  • Post has multiple categories – what now: Show all categories | Show the last category viewed
  • Show how many posts
  • Single posts view – Order: DESC | ASC
  • Single post view – Orderby: Author | Category | Date | ID | Random
  • Category view – Order: DESC | ASC
  • Category view – Orderby: Author | Category | Date | ID | Random
  • Remove/Keep child categories

How to use ?
Just install the plugin as you are used. Go to the admin panel and choose “Widgets” which you can find under “Appearance”. Put the widget into a sidebar and customize the settings!

Version: 0.6.0:

  • Added: Option (Control child cats)

Version: 0.6.1:

  • Fixed: Added title attribute

Version: 0.7.0:

  • Added: Choose where the widget must be shown
  • Added: Separate control for Order & Sort options

Version: 1.1:

  • Fixed: Fixed some minor ugly coding mistakes
  • Added: Added a default class to the list item (category-item)
  • Added: Added a list item class to the current shown post (category-current-item)
  • Fixed: Fixed the issue concering the option which will show the widget on category pages and single posts (didn’t work properly)

Version: 1.3:

  • Added: Added the possibility to show posts from a specific year or all years

Version: 1.6:

  • Added: Added the possibility to exclude categories from the widget entirely
  • Added: Added the possibility to control the excluded categories by specifying where to exclude them: single post, category, both, do not exclude anything
  • Added: Added the option that when a single post has multiple categories, you can choose if you want to show all those categories or just the last viewed(uses cookie!)

Version: 1.7:

  • Fixed: Buffering

Version: 2.0:

  • Added: Added the possibility to show sticky posts on top of the list
    • Sticky posts will be ‘ordered by’ and ‘sorted’ using the same configuration as ‘Single post/Category view’ – ‘Orderby’ and ‘Order’
  • Fixed: Bug showing last viewed category – did check cookie while post was published in 1 category – now it shows the category just as expected
Attachments 5 image(s) & 0 video(s) found.
VN:F [1.9.21_1169]
Rating: 9.8/10 (6 votes cast)
VN:F [1.9.21_1169]
Rating: +6 (from 6 votes)
Category content, 9.8 out of 10 based on 6 ratings
Category content for WordPress
Category content for WordPress
categorycontent.zip
Version: 2.0
5.9 KiB
Details...

Home Forums Category content

This topic contains 55 replies, has 9 voices, and was last updated by  Anonymous 8 months, 3 weeks ago.

Viewing 15 posts - 1 through 15 (of 56 total)
  • Author
    Posts
  • #7014

    MrXHellboy
    Key Master

    This WordPress plugin (widget) will be shown when visitors are viewing a single post, category page or both. Otherwise, it wont be there at all. The w
    [See the full post at: Category content]

    #7015

    Sam

    Hey – this is really a fantastic plugin.

    One thing though – is it possible to configure it so that the widget will only show more posts from the subcategory level?

    For example if I am on a post in /category1/subcategory1/ I only want to show more posts from /subcategory1/, not /category1/ AND /subcategory1/.

    If that would be possible, I think this plugin would be flawless. Thanks again!

    #7016

    MrXHellboy
    Key Master

    For my understanding….. You want to exclude the parent category(s) ? The same for child category(s) ?

    Cheers

    #7017

    Sam

    exactly – I only want to show posts for the exact sub category I’m reading a post in, not any posts from parent categories.

    #7018

    MrXHellboy
    Key Master

    Hi Sam,

    I dropped a file in your mailbox. Please replace the current plugin file with the one i just dropped.

    let me know.
    Cheers

    #7019

    // kevin

    I needed to remove a duplicate entry from the title tag (had posts in topic1/province and topic2/province), and also wanted to remove the link that would come up in the widget for the current post and added this:

    # override by // kevin to get rid of duplicates
    $CatTitles = get_cat_name($IDS[0]);
    # page to exclude from list in widget by // kevin
    $thePostID = $post->ID;
    # Post arguments
    $args = array(‘orderby’ => strip_tags($instance['orderby']),
    ‘order’ => strip_tags($instance['order']),
    ‘post_type’ => ‘any’,
    ‘post_status’ => ‘publish’,
    ‘numberposts’ => strip_tags($instance['amount']),
    ‘category’ => $CatID,
    ‘exclude’ => $thePostID);

    #7020

    MrXHellboy
    Key Master

    Hi Kevin,

    1. Which version do you have of this plugin ?
    2. Could you please give me your website so i can see the problem.

    This plugin checks whether your post has been placed into multiple categories. As long as you have no posts, placed @ multiple categories, you can change the above code without any problems.

    However, i will note your comment for future updates if needed.

    Cheers

    #7021

    lrsamuel
    Member

    Hi MrXHellboy,

    First of all, this is a great plugin. Thank you very much for creating it. I have 2 questions for you:

    1. Is there a way to have the header of the widget have custom text, instead of just a listing of the category? For example, I post video entries on my blog. Right now, it shows links to the categories. I would like it to say something like “Other Videos in this category”, and not link to the actual category.

    2. Is there a way to also have it show up on the category pages? For example, when someone goes to mydomain.com/category/videos/, it shows the most recent 10 videos in that category. I would like to have it also show the widget in my sidebar then.

    Looking forward to your response.

    #7022

    MrXHellboy
    Key Master

    Hi Irsamuel,

    Both your requests could be done. I will look into it next week and update the plugin. I will send you a “test” version by email so you can check the updated plugin.

    Cheers

    #7023

    lrsamuel
    Member

    Oh wow, that would be awesome. I don’t know if you want to think about one more feature, but what would be AWESOME is if you can give it the ability to show the post thumbnail if someone chooses to do that. Somethings small – maybe like 35×35 pixels. Please think about it :)

    #7024

    MrXHellboy
    Key Master

    Check your email :)

    #7025

    TSG
    Member

    Hi Lauren,

    Great plugin – saved my bacon this week, thanks!

    I’ve put the widget in the sidebar and I was hoping that the title field would override any default output? Currently it appends the category name (e.g. “Recent posts in category name”) when all I really want is “Recent posts” (I had to add “in” to make a sentence).

    Using v0.7.0, a fresh install of WP and TwentyTen on localhost.

    All the best, Karl

    #7026

    MrXHellboy
    Key Master

    Hi TSG,

    I’m glad you like the widget.. :)

    You can turn off the appended part. Go to your widgets and within this widget there is a option called “show categories”. Set this to no.

    Cheers

    #7027

    majorfun
    Member

    Having some trouble – check majorfun.com – when I select a category it lists multiple categories, not just items belonging to category I selected. (most of the entries have multiple categories)

    #7028

    MrXHellboy
    Key Master

    I see your issue. You got some time to test a new release ? Can i send it by email ?

Viewing 15 posts - 1 through 15 (of 56 total)

You must be logged in to reply to this topic.