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.

Posts retrieving

In the “Posts retrieving” section the categories and tags are now chosen manually by entering their respective slugs (i.e., the short form generated by WordPress). To find these slugs, go to the categories/tags management and search there for the terms.

Obviously, this is not as simple as before, but it’s necessary in order to avoid slow page loading.

A benefit of this change is that now you can retrieve posts from multiple terms. Before 1.19 you got posts from one category and/or one tag, now you can get posts from multiple categories and multiple tags (for example, posts that are in “Category 1” or in “Category 2” or in “Category 3”, and so on). In order to do that, simply enter the slugs separated by comma, for example:


Also, you can get posts that are under two or more categories at the same time. In order to do that, simply use a + (a plus) between terms, for example:


This was not possible before 1.19.

Posts exclusion

In the posts exclusion section, I removed the two forms and added two simple text fields. In this case you will not use the slugs of the terms but their IDs. In order to easily find the IDs of the terms, install a plugin like Reveal IDs: this plugin will add a column in the page management of terms.

Even in this section of the widget, you can use a comma to separate each term or a plus sign, as described before.


After updating the plugin, it’s better to take a look at the widget of Posts in Sidebar and make sure all is OK. If all seems to be right, save the widget anyway.

In fact, in this version change, you could encounter a couple of “issues”, that can be easily resolved:

  1. If in the previous version you didn’t specify a category or a tag in the “Post retrieving” section, after updating you will find a “NULL” value. Simply delete this value and save the widget.
  2. If in the previous version you specified a category or a tag in the “Post exclusion” section, simply save the widget.

For any question or help, please use the WordPress forum.

Published by aldolat

A WordPress fanatic.