I have this plugin in Wordpress that I've heavily modified. The purpose of the plugin is originally to display thumbnails for whatever category you tell it to. As of right now, I've made it done much more than that. But anyways, here is the shortcode for the plugin..
[categorythumbnaillist 7]
7 being the category ID of course. The plugin gets the posts for whatever category and orders them using this code:
$myposts = get_posts( 'numberposts=-1&&category='.$listCatId[1].'&&orderby=
'.$categoryThumbnailList_OrderType.'&&order='.$categoryThumbnailList_Order );
Now, I wanted the plugin to only show posts if it has has the tag "news" in it. So I did the following:
$args=array(
'tag' => 'news',
'showposts'=>5,
);
$myposts = get_posts( $args );
This sucesfully displays 5 posts if it has the "news" tag in it. But here is the problem...
I'm going to be using this plugin multiple times on one page. So when I use the shortcode listed above with a different category ID, the plugin doesn't work since I'm not linking the shortcode category ID with the $myposts code. :(
I'm going to be using the plugin with my news category, photos category and audio category. I would like it to display each categories thumbnails via shortcode (like the plugin is intended to do) but also only display the news posts with the tags "news"... for only the news category. How would I combine my two codes to make it function properly and display only news posts with the tag "news" while still displaying the other category posts properly... all via shortcode like the plugin is supposed to do? So for example... I'd have..
[categorythumbnaillist 3] (news category)
[categorythumbnaillist 5] (photos category)
[categorythumbnaillist 7] (audio category)
I'd like news to only display news posts with the tag "news", photos to display the photos category posts and audio to display the audio category posts. Again, I've already figured out how to do one or the other, I just don't know how to make the code do both.
Any help would truely be appreciated!!! :)