How Posts in Sidebar chooses the main category of the post

A technical blog post on the new feature “Sort categories” in the Posts in Sidebar plugin.

One of the features of my plugin Posts in Sidebar is that the widget, when viewing a single post page (i.e. a blog post page), can display a content different from the standard. For example, a user could want to display a list of recent posts in the main widget but, when viewing a single post page, a list of posts published under the same category of the main post. The feature is available under Getting posts > Change the query when on single posts.

In a recent release of my plugin Posts in Sidebar (exactly the 3.8.4 version) I made an important change regarding which category to use in order to get the posts, when a post has multiple categories. In the previous versions the plugin picked up the category with the lowest letter in the alphabetically sorted list of the post’s categories and used it to get the posts. Starting from 3.8.4 the plugin can use the category with the lowest ID, that is the WordPress-style to choose the category for the permalink construction. Let’s see something more detailed on this.

Continue reading “How Posts in Sidebar chooses the main category of the post”

Posts in Sidebar 1.19

Yesterday I released Posts in Sidebar 1.19 that contains a requested change. Before 1.19 you have had a dropdown menu in order to select the category or the tag but, if you had a large number of terms, the page would take a lot of time to load.

Some of the users of this plugin asked me to change this. The change has come and now categories and tags will be chosen using a simple text field, where you have to enter the IDs or the slugs of the terms, in the way I’ll explain here.
Continue reading “Posts in Sidebar 1.19”

New features in Posts in Sidebar

This is a Saturday of updates! After having released v.2.2 of Private Content plugin, now I’m proud to introduce you the just-cooked 1.8 version of Posts in Sidebar. Just last week I released the v1.7 with important new features like the possibility to show not only posts but also pages and custom post types. This week you’ll get the last missing features and this is the changelog for the new v1.8 of Posts in Sidebar:

  1. New: added post format as option to get posts.
  2. New: added option for link to custom post type archive.
  3. New: added option for link to post format archive.
  4. Other minor changes.

Only one function is now missing: grab posts using custom taxonomies. Hope to finish this work soon.

Enjoy! :)

Posts in Sidebar 1.7

New 1.7 version of the Posts in Sidebar plugin.

The Posts in Sidebar plugin has just been updated to version 1.7 and now it sports a series of changes. From day to day I receive requests both in the forum and via email from users who launch their idea. I think this is a very good thing for developers. The plugin is constantly evolving, also thanks to these suggestions.

The new version has this changelog:

  1. The plugin now can display not only posts, but also pages and custom post types.
  2. Now the author of the post can be displayed next to the date and comments.
  3. The content of the posts can now be displayed as Full content, meaning that the post is displayed as in a single post page (useful for a video-only posts, for example).
  4. The link at the end of the excerpt can now be displayed as Read more… (or whatever the user wants).
  5. Added French translation, thanks to Thérèse Lachance.

Many other changes have been done. What remains to do is:

  1. retrieve posts via posts format;
  2. retrieve posts via custom taxonomies.

I hope to have the time to do that. :)