Adding this to version 0.44 too, check it out!
but, please tell me, did you write it now after my posts because you liked the idea, or is it such a syncronicity that you worked on exaxtly the two options i need right now?
if option 1, then thank you for your amazing fast response and integration of the parameters.
i will check it out soon, at latest tomorrow i will give you feedback…
sidenote:
http://wordpress.org/plugins/list-category-posts/other_notes/
there is one star too much, giving wrong formatting:
**currenttags*
First test:
I added [catlist currenttags=yes] into a text widget and it seems that it works on a AND base, so only the posts that have exactly all the same tags are shown (in my case only the same post 🙂 I guess this is more rarely needed.
I would need it on a OR base, meaning it is enough if one of the tags of two posts are the same to be taken into the list. Is this possible as well? I think this behaviour would make more sense in general for most situations.
On pages, the widget gives an error message (of course it should not be displayed on pages with such a function, since they have no tags, but maybe it can just stay empty)
Warning: Invalid argument supplied for foreach() in /var/www/vhosts/sundari-spiritual-art.de/httpdocs/imlichtewplay/wp-content/plugins/list-category-posts/include/CatList.php on line 241
Hello again, i saw you already fixed the error message in a new update. Could you please let me know about the AND / OR fact, just a short line if you consider to add/change it, thank you once more…
Hi Sofian777,
Yep got the warning fixed.
About the other question, I am using the tag__in parameter from WP_Query. So it should be using (it is in my tests) the OR relationship. To use an AND relationship, I should use the tag__and parameter.
How are you using it on the text widget? Just the shortcode and it works?
It’s really strange :S
Double check your tags and let me know, see if we can fix this.
Thanks!
The shortcode didnt simply work, i added
add_filter('widget_text', 'do_shortcode');
to my functions.php 😉
I made now more detailed testing and it is true, it works after the AND principle, the mistake was in our tag structure that made it look different. With specific testposts i can now confirm AND.
Yet i discovered
– one unclear behaviour:
When the post has no tag, or a page is opened (which has no tags by nature), the error message is fixed, but the list is not empty, but full, it seems to take “nothing” for “everything”. Maybe a little “if posthavetag” or something could avoid this. I think if there is no match, it needs to be empty.
– one improvement:
the post itself is also listed, which i think in rare cases is wanted or needed. can it be excluded?
I’ll add a condition for when there are no tags to not show any posts. Thanks!