The Query Posts WordPress widget is finally here. I figured after I’ve let you all beta test this thing for over a month, it was about time.
This widget has everything you’ll ever need to show posts on your site without touching code. It’s like having a WordPress developer ready to do your bidding all wrapped up in a widget. All you need is a theme that’s widgetized, which I believe is pretty standard these days.
What does the Query Posts widget do?
It lets you displays posts by nearly any criteria you can imagine using the query_posts() function, except you don’t need to know anything about PHP to use it. You can do all kinds of neat things:
- Posts by tag.
- Posts by category.
- Posts by author.
- Posts by time/date.
- Posts by custom field key and/or value.
- Choose any number.
- Order by various terms.
- Show pages.
- Show the full post, excerpt, or even order them in a list.
- And much more…
Nearly 40 options are available in this widget, which you can use any number of times. Just check out the screenshot:
Download the Query Posts widget
If you need more detailed instructions on how to use the plugin or don’t understand the settings, see the readme.html file included with the plugin download.
- Support: Support forums
- Download (from WP.org)
Tutorials:
- Basic instructions included in the
readme.htmlfile. - Video Overview by Adam Warner
- Query Posts + Widgetized Page Template + Widget Logic video by Adam Warner
Please don’t use my contact page or the comments section below to ask support questions. Use my support forums at Theme Hybrid, which is where I handle all support questions for my WordPress projects.
If you run across any bugs or want to share ideas about how to make this plugin better, feel free to post in the comments below.
Very nice!!
I would love to include this into some themes!
Woh….. This looks really, really nice
This could quite easily replace the need for ever diving into PHP coding just to display alternative post/page views. As part of a theme this would be seriously revolutionary for a lot of users.
Thank you SO much! This is going to save me a lot of headaches and time.
The Frosty — I personally think it wouldn’t be a good idea to add something like this to a theme, which is why I haven’t. That’s just another layer of complexity in the development process. Every time the plugin was updated, the theme would need to be updated. Something this huge needs to be outside of themes.
mkjones — It could definitely replace the need to dive into PHP. Now, what’s really needed is a completely widgetized theme or something like Hybrid, which has a template that’s completely widgetized.
Tibor — See, we’re quite the opposite. This plugin/widget gave me a lot of headaches and took up too much time.
I hate to ask this, but could you show an example or two of this in action. I’m a fledgling WP user, having just discovered it a few months ago. I’m handy with HTML and CSS so much that I teach it and can do what I want with it, now I’m trying to come to grips with the power of WP. I just can’t get my head around what this plug-in allows, an example would be great!
rgregroy — No, I can’t really show it in action. I don’t use the plugin here on my blog. Even if I did, there’d be no way to actually show you how it works. That’s probably a bit mind boggling if you don’t understand it though.
Basically, it allows you to show WordPress posts according to the parameters that you input.
@ rgregory and Justin,
I am working on a quick tutorial video for your plugin. Awesome, awesome stuff Justin. Probably one of the most powerful WP plugins to date!
Adam W. Warner — Awesome! Post a link whenever you’re finished, and I’ll link to it in the post. It would be great to have a video guide.
Will do Justin…
I’ve made a quick video overview. It only outlines the interface and I use just a simple query example, but I plan to make a few more videos after I explore the plugin a little further.
Hopefully this will help users to visualize the power of this plugin.
Video Here:
http://wordpressmodder.org/query-posts-widget-wordpress-plugin-video-overview-tutorial-350.html
Yeah, your probably right. But I would definitely build a theme with this plugin in mind, and ask anyone to download it.
Works great, thank you
testing this now .. looks quite useful
@Adam Warner – Thanks for that Adam! It’s a great start. I can’t wait to see the next installment.
@Justin – Now all we need is a plug in that allows you to insert a widget with some shortcode! So you can use this in the body of the page without hacking.
This plugin is amazing Justin, you are a crack
You have a very insteresting blog.
Greetings!
Just a quick question – is it possible to create a loop with related content to a post with this plugin? For example list all posts that belongs to the same tags or categories?
The video overview above is now available on WordPress.tv here, http://wordpress.tv/2009/03/17/using-the-query-posts-widget-plugin-video-overview-tutorial/
Just a note–because the plugin zip does not have the files in a sub-folder you get the error message “Plugin file does not exist.” when you install this plugin using the “Install a plugin in .zip format” option in 2.7.1.
Adam W. Warner — Thanks for the video. I’ve added both links to the post. Maybe it’ll help out some people.
The Frosty — Yeah, I’ve got a theme in the works that would definitely benefit from this plugin.
baron — You’re welcome.
dinu — Let me know how it works out for you.
rgregory — I thought there was a plugin like that (for ads or something), but that’s easy enough to do. I wouldn’t recommend using this plugin like that though. It’d probably break something. What you really need is a theme with a widgetized page template.
Eteban Rojas — Thanks. I’m glad you like the plugin.
Jonas — Why not just use a related content plugin for related content? That’s what they’re good for.
MichaelH — Yep, I’m well aware of this. I might change it up in the future.
Justin – Yep, there are a lot of plugins that do that. However most of them suck and I just wanted to know if the Query Posts Widget could figure out which categories or tags that is attached to a current post and then display other posts that matches.
What if my home page is grid based showing 1 post from each category. How can this plugin make it look more beautiful?
I liked the plugin a lot. It opens up very exciting possibilities for widget areas all over the theme. Thanks for that!
Localization didn’t work for me, though.
Hello,
VERY nice addition…
I would like to know if it would be possible to have this output horizontally so that I could have it show let’s say 5 recent posts across the top of my homepage under the header?? I realize it’s setup to display in a sidebar but horizontally would be TERRIFIC. I’m a total noob at coding.
Jeff
Woa! This plug-in is a real show stopper.
On one of my blogs, I’ve been scratching my head as to how I could spin older content into new indexes that visitors would find useful and your plug-in is helping me do just that.
Thanks for sharing it with us ; )
hello may ask you how to create tht query, im still newbies in wordpress can you teach me
Jonas — That’s not what this widget really does. It’ll only show what you tell it to show.
sriraj — This plugin has nothing to do with how something looks. That’s a theme’s job.
Renato — Yep, it definitely opens up some possibilities. I have a theme I’d like to develop that would take advantage of this plugin, specifically.
I’ll look more into the localization. There’s a ton of text I probably should go through.
Jeff — You can put widgets wherever you want and display them however you want. This widget was definitely not meant to be used in a sidebar, but that’s always an option. How the widget is displayed depends on your theme’s styling. It has nothing to do with the widget.
Claude Gelinas — No problem. I’m glad you’ve found it useful.
hafe — Read the
readme.htmlfile. Watch the video. There’s really not much more I could say.Hi – cud u plse explain if we can display ‘pages;
– not posts?
Thanks for plugin. Keep the great work.
Simon — Yes, you can display pages if you want.
WPCrowd — You’re welcome.
Hi Justin – sorry to be painful – currently we are just getting posts showing up – where do i change the option to ‘pages”
Thanks
Simon
Further to my comment – wud you be a able to ad all the ‘posts” option – to the pages options – as a commercial project” – ie sort by pages by menu order and meta key or tag etc
It is excellent, it has been a long-awaited plugin finally out. Thanks
Tinh — You’re welcome. Let me know how it works out for you.
Hi Justin – just hoping you can get back to me in terms of request above – cud u possibly email me so we can discuss offline?
Another video, this time showing how to use the Query Posts Widget plugin, Hybrid Widgetized Page Templates, and the Widget Logic plugin to create pages containing any combination of posts you can imagine.
http://wordpressmodder.org/query-posts-widget-plugin-widgetized-page-template-widget-logic-wordpress-gold-366.html
Simon Hammerton — I currently can only handle support requests through my support forums. Check out a couple of the tutorials listed above.
Adam W. Warner — Yet another great video. You’ve made what could easily be a complicated process seem pretty easy to me.
I’ve also created a tutorials section in the post. That way, the videos are highlighted a bit more.
I really think if you get to this stage you should turn to a CMS like drupal with it’s awesome views module
tobias — I much prefer a WordPress-flavored CMS with a dash of cool plugins for the best experience.
This is a really nice plugin and makes intelligent use of widgets so much easier.
I`d like to propose an enhancement for “Display” option:
Is it possible to make a feature to show “the_content” without Page title etc, just the main content ? If yes, it would make it so much easier to edit “widget areas” content for clients/users.
John Myrstad
Great plugin! very very thanks..
hello Justin
thx for a really nice plugin..
im trying to utilize it best i can.
though i noticed small syntax error in tihs line of readme.txt file:
‘after_title’, => ”
i guess it should be
‘after_title’ => ”,
im trying to build template so i can put Query Post to content page area. I hope ill succeed!
i created page-widgets.php templates in my theme folder (i copied page.php file and entered this part
But when i try to Add new page from template dropdown menu this new page-widgets.php is not recognized. Am i doing smt wrong?
thx!
it should be:
…small syntax error in tihs line of readme.txt file:
‘after_title’, => ‘{/h3}’
i guess it should be
‘after_title’ => ‘{/h3}’,
i created page-widgets.php templates in my theme folder (i copied page.php file) and entered this part {?php dynamic_sidebar( ‘widgets-template’ ); ?}
But when i try to Add new page from template dropdown menu this new page-widgets.php is not recognized. Am i doing smt wrong?
thx!
oh i got it!
i read carefully this post on your site…
Page templates: The untapped potential of WordPress
thx ill c if i can get through..
Thats a pretty advanced plugin! Loved it, the seo potential of it is fabulous! It will really help my blog!
Hi,
First of I love this plug-in and am very happy, so thank you ! I am having a couple of problems though.
1. As its a widget and I wanted the posts to appear in the main page area, I decided to put it in ‘page top’ it appears fine but always with a sidebar regardless of me writing in functions.php not to display a sidebar on that page, example http://www.panoraks.co.uk/virtual-tours/fpp/
2. When the list is displayed in page top widget area there is always 1 extra post appearing underneath, example on homepage http://www.panoraks.co.uk
Many thanks,
tom
is there a way to have this plug-in working for pages as well as widget areas ?
maybe a shortcode for query_posts that you can place easily in page admin. I’ve just been reading about your Template Tag Shortcodes.
F*cking awesome!
Been looking for something like this for a while. I can get rid of 5 hacked up widgets now and replace with this.
dont worry, i sorted it another way
whether this can be in use for wordpress 2.7.1
thank you for share this plugin
Hey Justin , I have a question…
Can this plugin be used to display a simple ordered list of items ‘in’ a specific post.
For example, I want to write a post that has various news headlines of the week, can this help me do that? And can the posts be styled somehow?
Long questions but I am a total noob
..
Great plugin btw..
I think I’m in the same boat as everyone else here.
My theme doesn’t use Widgets, but I want to include the data from your widget plugin in posts/pages/archives, whatever.
Is there a way to do it?
I tried including the code your provided in readme.html in my functions.php file, but got a bunch of errors.
Any hope of an easy include in a template file?
I like the plugin but have a few questions, things that aren’t quite working out.
1) When I added the plugin, my tag cloud disappeared. Any way I can have them both?
2) We apparently cannot add this anywhere; the only option is for sidebar. Is that correct? I believe the site said “add anywhere” but I don’t see how. If possible, then how?
3) It shows up on all pages. How can I get this on selected pages, i.e. my home page, or any other stipulated page? Is this possible to limit its appearance to certain pages?
Thanks much.
This is a fantastic plugin many thanks! Saves time even if you know the php
Some text deleted by admin. Please take note of the policy regarding support questions.
Would be great to add a few more display options such as remove the title or meta data and whether to link to the post. This is a very useful plugin thanks again.
I’ve modified this great plugin a little and added post title on/off, author info on/off and meta info on/off. this gives some more scope for CMS (multiple editble areas of text on a static page). If anyone is interested let me know here.
Justin, if this isn’t ok let me know
jeff — Save the questions for the support forums please.
Mike — If your theme doesn’t include widgets, there’s really no reason to use this plugin. It’d be a lot easier just to code everything in your theme template files.
Jane H — Please ask all support questions in the support forums.
tom — It’s okay that you’ve chosen to do that. Although, I must say that it wasn’t needed. I can’t actively encourage others to edit or use an edited version of the plugin though. I just have too many horror stories from these type of experiences.
I would be very interested in a version that allows for turning off the author info — I saw Tom mentioned this above, and Justin said it wasn’t necessary — could someone please provide instructions on how to disable the author info from showing in the output?
I have done this by editing the plugin, but it would be great to use the plugin as is, if there’s a method for this.
Thanks
Thanks Justin. Was there a way to get the functionality i added that I overlooked (using posts and categories to add more editable content blocks on static pages)? I agree that edited versions are not a good idea unless tested properly, works fine for my purpose but it might well destroy someone elses site, it’s fairly unlikely in this instance but I won’t risk it on a production site yet!
Hello,
Thanks for the plugin!
Do you know how I could edit it to make it order the posts by meta_value? Thanks again!
Hello! This seems great! However, it won’t show in my plugins list???
tom — Yes, you could’ve done all that without editing the plugin.
Lex Vilanova — It’s likely you installed the plugin incorrectly.
How is it possible to install a plugin incorrectly? I unzipped, moved to directory, blam..it should be parsed and show in the ‘in-active’ list right? Thanks
This rocks. You rock. Thank you for sharing and helping people out. I send you a virtual beer
Lex Vilanova — I don’t know how people install them incorrectly, but it’s something I come across nearly every day. So, you tell me how one can install a plugin incorrectly.
Ella — You’re welcome. And, thanks for the beer.
@Justin Tadlock – OK, fair enough..I can understand that. It’s just difficult to admit for me since I had just installed about 5 other plugins before this one smoothly (hell, there’s 3 steps to it)..I’ll take a real close look and hopefully I’m just making a zombie dumbie mistake. Thanks anyways! (I can’t wait to see this in action!)
Is there a way to take the meta info off the post preview in the sidebar?
I dont want the “posted in” and “Leave a response”.
???
Brad — Please ask all support questions on my support forums.
Hello Justin,
I was wondering if this plug in give me the option to display the post only inside the category I choose, not displaying it in the main area (home)? There are some posts I write that are I’d like not to show there (home)…
Thank you!! And thanks for the dedication!
LiLi — This widget will allow you to display your posts in any widget area you want. Just read through the
readme.htmlfile to read about all the options.Justin,
Thanks for this great plugin. I used to use it and loved it very much, but after upgrading PHP from 4.3 to 5, I have my frontpage disappear. Only white. No warning, no error.
I deactivated all plugins and reactivate them one by one.
All plugins but query posts are OK .
How can I fix it?
Thanks for your help.
I upgrade to wp 2.8 all my query posts links have gone missing ?? and every time i go to put them back in.. it deletes the last one i put in.. ?? HUmm
Good job with this plugin, easy to use, works great, thanks
does not seem to work with wp 2.8–it prevents the home screen from appearing and the posts queried become part of the home screen
Hi Justin
I find a little bug :
line 93 ->missing e in instance , so the page_id condtion doesn’t work
usefull plugin, thank you
Just used the automatic update and all my widgets made with queryposts dissapeared…
I’m not happy!
champvermont — The issues with WordPress 2.8 have been cleared up in version 0.2 of the plugin.
Serge — Thanks. I’ll have that updated in version 0.2.1.
M — Fortunately, your emotional state is not really my concern. This was noted in the changelog, which you should’ve read before upgrading.
Comment deleted by the administrator.
M — Quite frankly, I don’t care. If you’re “not happy,” that’s not my problem. This is my personal blog, one in which I sometimes release free plugins to the public. You are free to use them if you want. But, you will be respectful when you post comments here.
Hi.
Thanks for great plugin.
I tried to output posts in random order, but it doesn’t work, because I am using Smart Sort plugin to sort posts, when displaying them in specific category.
Is it possible to owerride Smart Sort’s order just in Query Posts Widget output?
SportaKarte.lv — The best thing to do would be to deactivate your other plugin. It will always override your other queries. That’s the point of the Smart Sort plugin from what I can tell.
Hi Justin – Thanks for this awesome plugin. I used to struggle through doing this sort of thing with code; your plugin saves an enormous amount of time.
Would you be interested in adding some functionality to the “Display” option, so that one could elect to display only an item’s title? That would be really helpful for listing items in a sidebar, for example.
Would you happily pay you a reasonable amount for including this feature.
Kind regards
Richard
Hi Justin,
Thanks for this one of a kind plugin. Perhaps I missed something – the plugin is not working with WPMU for me.
Warm regards
Comment deleted by the administrator.
Richard — I’m happy you like the plugin. The display options for the ordered and unordered lists will only show the title. I am thinking of adding some more options in the next version though.
Privendo — I don’t personally test my plugins with MU, but the older versions should work with it since the latest release is just for WordPress 2.8. Is WPMU 2.8 out yet?
M — Really, what do you hope to accomplish here? I find it rather sad that you have nothing better to do with your time.
I’ve been scratching my head as to how I could spin older content into new indexes that visitors would find useful and this plug-in is helping me out.
thanks
I love the concept but no matter how I upload, I keep getting this error message:
Fatal error: Class ‘WP_Widget’ not found in C:\Inetpub\vhosts\lisatrigg.com\httpdocs\wordpress\wp-content\plugins\query-posts\query-posts.php on line 15
I’m using the Thesis Theme 1.51 and Wordpress 2.71. Hope you can help me.
thanks,
Lisa
Wicker — Cool. I’m glad you like the plugin.
triggxr — I’d be happy to help out. Just go back, read the post and instructions on using the plugin, and direct your question to the appropriate place.
Justin
what a nice plug-in! I used it today, and it *nearly* did exactly what I wanted! I am building a site using WP as CMS, and I have built front page from widgets. So using your widget, I can show a specific page for the front page column 1 content, another for column 2 content. So, it was great to find your code.
Only problem, I just want to use “the_content” and no other details like “author” and “date”. I couldn’t find a way to suppress the other tags.
So instead I crafted some PHP code inside the template using the loop. Oh well… but if you update this, it would be perfect!
Thanks though
Adam
I’m looking for this kind of functionality, but with the amount of categories I will need, I really need something that works more like a page by page directory rather than a sidebar tool. Any way this plugin can fit the bill? please advise.
Hi,
Nice plugin! Really nice.
I have translated it into Danish. The language files are available from here.
The query parameters are not internationalized. In the Danish WordPress, “draft” is “kladde” etc. Some end users would be grateful, I am sure, if you would internationalize dropdown options etc. in the widget. I know by experience that this may require some recoding because the plugin must use the English terms internally. However, if you do have the time etc. for it, then thank you!
PS: I have written a short presentation that will be posted on my WordPress-portal tomorrow.
Without reading though the huge amount of comments, has anyone tried this with Thesis? Have you had success? I am hoping it will allow me to make custom pages with certain posts easier than a huge if statement.
Hey Justin your plugins are incredibly useful! One question though, is there a way you could look at Privendo’s request. I would love to try this on my MU installation!
Just adding another “Thank You!!!” to the list!
Hi
I would like to give my site users the ability to view posts where thay have ever added comments. Can I use this plugin for it?
I want to be able to post just an individual page’s content. How can I do that?
adam d — If you’re writing PHP, you might as well be creating your own queries using
query_posts(). This plugin is for people that wouldn’t be able to do that, so I doubt this functionality will change much, if at all.rodney — You can use this widget in any widget area. Nothing says it must be used in a sidebar.
GeorgeWP — Thanks for the translation. I’ll add it to the next update.
As for localizing the things that aren’t localized, I doubt I’ll be doing that. I want this to be easy to use, but at the same time, it should be a learning tool. These are things that shouldn’t be translated because they’re specific strings for functions that can’t be translated. Adding another layer only inhibits the learning process.
John Doe — If you’re theme uses the proper functions for widget areas, it’ll work.
Simon — I won’t be testing it with MU. The best way to see if it works in that environment is to try out the plugin.
Joe Somebody — You’re welcome.
Levani — No. You’ll need to write a custom plugin for that.
Scott Aniol — Please refer to the documentation included with the plugin. If you have support questions, ask them on my support forums.
Very cool plugin Justin! Thank you!
One thing I noticed – the output is not themeable. It would be much better to be able to use templates instead of the hard coded format in the plugin.
I did a quick tweak to achieve that – basically put Post and Page HTML (from the loop) into the following condition:
I used this condition for both – posts and page – just changed the template file name.
It allows me to drop that template file into my Theme (or child theme) and the plugin will pick it up automatically. If no templates – it will use your default code.
Do you think you could adopt this idea into your plugin?
It would probably be even better to have another field added to the widget for the template file name. Or name template file names in certain way, so they’ll be picked up by the widget automatically and shown in a selection list. The reason I’m bringing this up, is that widgets are very flexible nowadays – they can be anywhere on the page, whether it’s a sidebar or a widgetized area within content, so the layouts of the final output can be different. For example if I’m using latest news, featured article or most popular content widgets within larger content areas – I may have have more space and freedom to include h2 titles, larger snippets, meta links etc. If I’m using the same widgets in smaller areas like sidebars – I might want to have smaller titles, shorter excerpts, no meta links – I’ll need it to be concise.
Please let me know what you think.
Thanks again!
Justin, did my php snippet totally got truncated? I only see “…page/post HTML goes here….” part….
I want to display the content of a single post in a widgetized area. How do I get it show up without the area title and other stuff. I just want the content.
This is a great plugin and one that I will be installing as soon as I move my blog from WordPress to it’s own hosting account.
Hello,Is there a way to show a list of all stuff ina category? links,images,post and pages,with pages that will haven’t touched their hierarchy,please? Looks like I don’t find a good balance with data extracted.
Thanks
Hi Justin,
THANK you for a great plugin.
By way of showing thanks, I did a Dutch translation. Please find it in zip format on http://4visions.nl/query-posts/query-posts-nl_NL.zip which you can include in the next release if you want.
Regards,
Allard
Thanks, for this plugin. i’ve being looking around for a plugin like this for sometime without having any luck. I will definitely give your plugin a try in my next project.
Benga creative
Hey thats really a cool plugin!
I was searching for this and finally got it here …
Thanks a million Justin.
Awesome plugin, Justin!
I’d just like to second a commenter above who requested a few more options – namely on/off switches for the author/tags/categories/comments link when using “the_excerpt” or “the_content” option, in order to be able customize the display a little more.
Obviously you could go crazy trying to make it too flexible, but some simple on/off switches seem like a fairly easy addition and would be a great help.
Anyway, thanks for this very useful free plugin!
Justin,
Awesome plugin. I’ve been using it for a while and I really like how easy it is to use. One thing I didn’t see was the ability to customize the ID or the class manually through the plugin. I like to style an icon next to the widget title, and using the normal “%1$s” in the ID spits out “query-posts-X” and not what the plugin is actually displaying. Allowing us to customize the class or ID would allow additional CSS formatting specific to the user’s desire.
Hi Justin,
Great job – I had written my own “feature category” widget before for a few websites and then I found your query posts plugin. For the current project I wanted a category post listing, but in a page, not as a widget – I see a number of others asking similar things above (Tom mills, Rodney, Mike, Max)
Anyway once I saw your plugin, some ideas got sparked….. and the “shortcode any widget” plugin was born – see http://webdesign.anmari.com/shortcode-any-widget/.
With this and your “query posts”, there is no need for custom templates.
in addition, “Query posts” should be able to be used in non widget themes.
This is amazing!
Is there away to leverage wp global variables? Instead of hard coding a specific author_name such as “bob” to use $curauth->ID
My problem with this plugin is that I can’t get a next set of posts. Example: If I display 5 post on the page, i want to be able to have the user click onto the next 5 post, then next 5 post, and etc.
The way it’s setup for me now is that they have to go through my archives or categories to see my other post. Is there a way to work around this? Please advise
Justin / wondering if there is a function I can use to query only posts in the current month … without having to select the month manually each time it changes.
I have the same problem of kvibe. I see my first 5 posts but clicking on “page 2″ the page remain the same and doesn’t reach the second 5 posts. I’m using WP 2.8.5 and the plugin WP-PageNavi .Any idea? I saw also something strange on row 93 of ‘query-posts.php’ : $instanc['page_id'] instead of $instance['page_id']. Thank you for your answer.
hi justin, your plugin is very interesting, but I have one question,
how do if I want to change or add attributes nofollow in the query_post ?
thanks for all your plugin, I really liked it
#Kvibe : I also had the same problem, next page is not functioning properly, is there another setting that should be in the edit, or my navi plugin page that does not match the versions?
Amazing plugin! Just wondering if it will work on WP 2.6 — THANKS!
thanks for your awesome blog, very excellent i like your blog and thanks to for your plugin query post
Hi Justin. This is a really awesome plugin, been fiddling around with using it for a current project.
I’ve got a loop, which calls posts from a different category but with the same custom field value as the current post, then within the post results, I want to pull further posts related to the posts found by a different custom field value using some custom field if statements.
basically I’m running a loop within a loop and using conditional custom fields to place different loops within the loop. I tried using your plugin inside the nested loop but seems it cannot perform normally in such a nested mixed query space. It pulls the same posts each time no matter what custom field values I set.
I know this sounds a little mixed up, but hoping you may have some insight.
Thanks a ton for this plugin though, it’s really great.
Just a tip: the version one hosted on your site doesn’t work with latest version of wordpress. Version 2 hosted at WP does.
xx
hi justin
have u stopped developing this plugin. the get image plugin has been updated but not this plugin and as such the thumbnails are no longer working.
please update this plugin to include support for ur get the image plugin.
thanks
krishna
Hey Justin
Love Query Posts.
Can I suggest an addition to the Readme, of this piece of code which can be used in templates
taken from a tutorial here, I ended up using this most.
Allows you to easily use QP plugin in non widget areas.
http://forum.bytesforall.com/showthread.php?t=1812
Thanks for your wonderful plugin.
I would also love to see the option of not including the post title and meta data of a post. Just the body of the post.
Thanks for a great plugin.
Great Plugin really nice.
Hi,
I am using Qp on a site to make a simple”archives” list of posts for each category.
However the current article showing on each page shows up in the “archives” widget list .
Could you tell me how I can exclude the current post from the archives widget?
Much appreciated!
Is there any way I can mod the Query Posts Plugin so that it will use the “More” whatchamacallit so that it will say “Read Full Article” instead of displaying the the entire post when there are “More” whatchamacallits entered in the post?
Great Plugin by the way.. now I’m able to have static content appear above my category archives so to speak.
Cool plugin! Thanks!
But there is one problem: The Widget Settings is too wide for a resolution of 1024×768.
Hi Justin,
Great plugin!
Just a FYI – This plugin causes Infinite Scroll to stop working, at least in my environment (thematic).
BAC
> This plugin causes Infinite Scroll to stop working
Actually, works if you force the latest jquery version from google CDN via the “use google libraries” plugin
BAC
Thanks Justin… I couldn’t of asked for a more perfect plugin for the project I’m currently working on… if not for you I would of spent ages coming up with a bootstrap solution that would of would of been about as versatile as Derek Zoolander… Thanks again man, your a live saver!
Hello,
I love this plugin it is the best thing out there for wordpress, it makes my blog look more like Joomla.
I have a question, if I want to just show the picture of the posts with just the tittle of the posts how can I do this? Right now it show the excerpt and the tags the categories the authore comment number which is not necessary as it is only to show pictures.
Thank you your assistance is greatly appreciated.
Yes! Finally! This is exactly what I was looking for! I’ve been messing around with the posts on my blog for freakin’ ever, and it was driving me to insanity. Thankyou VERY much for this! You’ve saved me alot of time and pain.
First of all, thank you for coding a splendid widget! A great pleasure to work with!
Is it possible somehow to integrate the widget, so that the content gets shown on a page instead of the sidebar?
Thanks in advance,
Kasper
—
amazing plugin! I just a quick request (ok but maybe it’s not so small),
I would like an option to customize the output format (like a custom defined template) instead of just ol, ul, the_content, and the_excerpt
This is a great, great plug-in. I’ve been looking around for a long time for something like this. Thank you.
thanks, but how to make, that if i press on category MOVIES – and shows only lists from the movies or press MUSIC and then shows only lists from category MUSIC…
this total confusing me.
Thank you for this fantastic plugin! I wonder if it is possible to adapt this widget to appear as an index of the site and in the different categories .. is that possible?
How would I integrate this into a template with a Php call?
I found this, try to understand how to do it but I’m lost ..
http://forum.bytesforall.com/showthread.php?t=1812
Thank you! This is a great, great plug-in.
any plans to allow custom post types besides posts, pages, any? with 3.0 one can add i.e. movies, recipes, etc. and I’d like to be able to chose from those if possible with this plugin.
I am using Query Posts with Custom Post types. I have a widget with posts for recipes and one for news. I use a couple of plugins for the Custom Post type. After creating a CPT for recipe, it shows up in the Query Post ‘post-type’ field.
Hi,
I’m using your plugin Query Posts to display posts links (events links) by date, order by ASC. On a widget, on my sidebar.
I would like to display only the events not finished (with a date in the future, not in the past).
I don’t understand all the features your plugin has. Can I do this with your plugin please ?
Thank you for your help.
I wonder if this plugin is compatible with Wordpress 3.0 ..Anyone encountered any bugs with the latest WP?
@prateek – I’m using this on 3.0, no prob.
The one issue I had with this plugin was that I couldn’t style the output while displaying a page – here’s my fix, to those that are interested -
On line 156 of query-post.php add the following:
And then a closing “}” after the built in loop.
With this in place, you can put a “loop-sidebar.php”, “loop-sidebar-{sidebar-id}.php”, or “loop-sidebar-{widget_id}.php” in your templates directory, and use that to format the loop.
Hope that helps anyone who’s interested!
It almost seems pointless to create a template though. If you’re advanced enough to do that, why not just add one line to your template for the query and not use the widget at all?
I do realize the need for more output options though. Those are coming in the next version.
Agreed, but our clients don’t have the “know how” to go in and edit template files – and we wanted to add the ability to add, modify, or remove this extra content, which your widget provides for.
So, this provides the best of both worlds – your easy to use interface for our client, and the ability to format whatever they request as we please.
It’s the most elegant solution I’ve been able to come up with, but if you see alternatives, I’m open to ideas. (or willing to help)
I can see where it’d be useful in that situation. The next version will solve a lot of problems though.
Awesome – sounds great. Can’t wait to see it. And, once again, thanks for the great plugin!
I know this is off-topic but i’m desperate. Been searching the web for two days. I need a simple query which this plugin seems to have but i want it in its actual code version.
I just want to display latest post by taxonomy. My taxonomy is “topics” and the tag under topics is “sports images”. I want to display 5 latest post by “sports images” tag within the “topics” taxonomy. How can i achieve this?
Thank you
Don’t know if this has been covered, but having some sort of boolean and capability would be great. For instance, to return posts of category x and category y, or of category x and tag z.
Possible?
Hello,
I’m using this widget to call specific posts to a specific area of a page (for a three column layout) by the post tag. I have a ‘Who We Are’ ‘What We Do’ ‘Why Work With Us’ type scenario and so each of those are single posts.
I’ve got it working fine with my limited PHP knowledge thanks to this widget, but I’d like to remove the link from the post title – does anyone know of a way to do this?
Best wishes
- Roo
Love your query-posts, was working great till I hit the post_mime_type – jpg, now it lists nothing. Only way to reset it to nothing is to delete, reinstall the plugin.
Any other way to clear that field?
Thanks for the plugin
@Kevin – ctrl+click the option you accidentally selected.
Justin, love the update – no need for me to format the output, this has all the options I need. Major thanks!
Hey Justin, this plugin is literally saving my life at the moment. I’m doing a large-scale Genesis site (a la TimeOutNY) and it would be impossible for me to manage all these content feeds without this plugin. Thank you so much. Your posts on custom post types have also been extremely helpful.
side note: our website uses graph paper too?! I’d never seen any of your plugins/site til now, but I guess we’re two brothers from the same motha.
Stumbled across your site by randon linkage on an unrelated topic, but this plugin iss absolutely perfect as I’d been looking for something similar for ages. Thanks!
Just when I was getting ready to create an adhoc one with 1 option called query string… lol. Was just going to say if you are confused reference WP Codex’s Query Posts section for how to write cat=1,2,3&posts_per_page=5&s=search … Your tool made it so easy we can let our clients go crazy with it too! Thanks a lot. We are always looking for innovative tools like this one.
Great Plugin! I am searching it a long time! BUT:
Is it possible to change the Date/Time and the Title? I have for every post a new widget (settings in your plugin) but the widget title ist always the name of the post! is it possible to setup the time/date there and the title in the widget?
Know, what i mean?
Greetings!
Hi, thanks the plugin!
I´m using it but now I´ve installed WPML (mulitilingual) and it only works in the default language.
I´m not a programer… butI think I would pass icl_object_id to the Query Post to filter the results right..
Any ideas how to integrate it?
Or any other solution for multilingual and Query Post?
Thanks in advanced,
Sorry my english
Hey Justin,
This plugin is exactly what I needed, thank you for taking the time to make it!
I do have an issue though. I’m using the plugin to create an excerpt of my about page in my website’s footer (same footer being used on all pages of the site).
The plugin does show the excerpt on my main index page, which also shows only excerpts of my other posts, but when I go to full posts and other full-content pages, the plugin shows the full content of my about page in the footer. How can I make sure that only the excerpt is shown in the footer no matter what page I’m on in my site?
Thanks in advance!
Hi, noticed after the wordpress upgrade that its not updating the posts anymore. Stuck on Dec 30.
Any ideas?
Kevin
Thanks Justin for that brilliant widget, I’m relatively new (6 weeks) to using Wordpress and wanted to achieve this on my website but didn’t know how/where to do it in the PHP code and this has saved a lot of time.
Just completed your other tutorial on ‘How to widgetize your page menu in WordPress’, and again I found it easy to follow and got the results I was after. I wanted a widget area in the Header and couldn’t find a suitable explanation
Looking forward to your new book when it comes out.
Colin
Justin, great plugin! Quick question, how do you get author images to show up next to each post? I have it setup where the author images show up next to each post in all of the category archives as well as in each post. I was thinking I may need to put something into the “Attachments” field inside the widget, but I am not sure. Any help would be great. Thank you.
Love this widget! It’s perfect, thanks!
This is *wonderful.* Thank you so much!
This is just what I’ve been looking for. I wish I’d found this days ago!
Thanks
I just installed and I’m testing Query Posts, and it’s awesome. It’s plenty of possibilities. I’m just missing a few things I think would be great to add:
- you already can add a class to every post, for example qp_featured. It would be great it’d also add other class qp_featured-x where x is the number of post retrieved. It would help a lot when styling it with CSS.
- it also would be nice you could set a number of caracteres when you se to show the whole content. It could be you need to show less text than the excrept.
Thanks again and I hope these new features are considered.
Hi!
I’m trying to use this plugin to filter only by a category, but it just won’t work. It shows all the posts from my blog.
Any way to fix this?
It would seem also that whenever a post has a tage attached to it, it does not appear in the search results.
Justin,
Are you going to update this plug-in, or is there no need to? I noticed on the plugin page that the last update was a little under a year ago: 2010-11-23.
Just checking to see what the plans are.
Thanks,
Tony Z.
The plugin will be updated whenever there’s a need.
Thanks Justin, for a great plugin!
The only issue I’m encountering is that thumbnails are displaying above all the text, including the title and author on one of my websites.
http://www.scsrc.org
Thank you for this great plugin !
Is there a way to exclude the post that is currently viewed from the query ?
Thanks again
Awesome plugin, and great guide too — all I’d recommend is making the guide more accessible. I ended up sticking a link at the bottom of the widget form itself, or it could just be in the plugin’s description. I stuck it in the widget form because my clients will probably need it every time they use the widget. Not a biggy — just think it would be helpful to others — and easy to tack on in a future release. Sorry if this has already been suggested.
Amazing plugin. Is there any way to maintain the HTML formatting (specifically links) from a post? It looks like it’s stripping out all formatting and just posting raw text. Thanks!
Love this plugin !!! Question…. How can i configure plugin to dynamically list only posts that match a variable ??? for example if my page has e.g /site/?multi_city=44 (in this case i only want to list in your plugin posts that match that particular cityID) …. where in the plugin can i add the variable passed to filter records???
Sorry for this… in ASP i could do this easy but in PHP phew not so easy!!!
HI,
I tried links for tutorials but they dont work.
I would like to have two seperate query posts in side bar. One that show the most popular 5 posts over the last 7 days and a second that shows the five popular post over the last 30 days.
Any ideas?
Very useful plugin. I’m using it in a couple of websites and it’s fantastic.
Justin, do you still develop this plugin? Some of the options not working.
Great plugin…
Thanks!
Just tested this for a client and it works like a charm. Thanks a lot, great work!
I’m using this in several places on http://picturesfor.me and it’s amazing!
One tip I added on my site which others may find useful:
in widget_query_posts.php I changed the Author Arguments section (starting at line 119) to the following:
This allowed me to then enter the word: page in the query field for author, to have it dynamically filled with the current page author for whatever page/post the widget appeared on.
I do have one quick question if anyone else has figured this one out:
How would I configure the widget to display the single latest post from each author? i.e. if there are 15 authors, and each made 15 posts, how would I get a listing of 15 posts each being the latest one by each author?
Thanks in advance for the help on this!
Hey Justin, thanks for this awesome plugin! Using it now. One quick q though, short of creating a new page template with widget areas in the “content area” is there any other functionality that will allow you to use this plugin to display the post within a page? I know I said one q, but also, can you set it to display the newest post in a particular category? Haven’t been able to get that combo going yet.
THANKS!
Hi Justin. Thanks for the great plugin.
I think it would be greater if the site editors can assign which post to show from the dashboard in GUI without administrator privilege.
Another thing is I’m using this plugin for more than 1 widget in my site. It would be very nice if each of them can have a different style, e.g., one is styled with 3 columns and the other has 2.
Thanks!
Hi Justin!
Your plugin is an oldie, but let me tell you, I auditioned quite a few similar “featured posts” plugins before finding yours, which does everything I need it to and more!
I am normally a Genesis developer, but I was looking for a non-Genesis version of the “Genesis Featured Posts Widget” plugin for a plain ole WP site, and this is it. I’ll probably start using it in place of the Genesis FPW plugin!
Yours is the only featured posts plugin that I could find that allows me to post THE ENTIRE post, not just the excerpt!
(Among many other handy features & choices…)
So… THANKS!
Hi
How do I add a background color to the widget-title?
Thanks in advance