Custom Post Type List Widget

44 Responses to “Custom Post Type List Widget”

  1. Keith says:

    I may have time to work on this in the next few weeks. For now, the plugin doesn’t do it.

    Keith

  2. Vicente says:

    Hi, it’s posible to show the category name? (like $post_title, $comment_count…) Thank you!

  3. Keith says:

    The plugin should not have anything to do with the widgets. I don’t know what the issue is. It works on my testing site.

    Keith

  4. Toni says:

    I added the shortcode to a newsletter archive page, and the list works wonderfully. However, when I click on a post link, the resulting page does not show any of my sidebar widgets. Is there something in the code that I should modify?

  5. Keith says:

    I could make allowances for the pages to exclude. I will add it to the TODO list for this plugin. I do not know when I will get back to it. I have about 30 widgets, and I’d like to spend time to update all of them in the next few months.

    Keith

  6. Brianne says:

    Keith,
    This plugin has been so helpful. I’d like the option to exclude 2 posts from my list, similar to the function that the WP Pages widget has. I’ve found bits of code here and there but can’t seem to modify the plugin code properly. I saw that someone already asked about this in August 2011, but it didn’t look like you had responded publicly about that.

    Here was the link I had found on WordPress to find the PHP for the Pages widget: https://core.trac.wordpress.org/browser/tags/3.3.1/wp-includes/default-widgets.php

    Any help you could provide would be greatly appreciated!

  7. Keith says:

    When I install two widgets in a sidebar, they work. Each widget remembers its own settings. This is the way it should behave.

    If you are using the Dynamic Widgets Plugin, I don’t know if it uses the same plugin instance or a new instance of the plugin.

    Keith

  8. Keith says:

    I am checking it out now. When I figure what happened, I’ll let you know.

    Keith

  9. Len Inkster says:

    Hi Keith, Excellent plug-in. Only problem I’ve found is that when it’s installed as a dynamic widget, each subsequent use uses the same profiles for the widget. Is there a way in which you can have each instance of the widget use a different dynamic display profile?

  10. Scott says:

    How could we apply a class to the LI tag, the one before the H3 title tag, so that we can have a “current_page_parent” for each section? That way we can style the LI and H3 tags for indicating that a section is “active”. You seem to have been able to place a “current_page_item” on the internal LI tags.

  11. Quint says:

    Thanks for responding, Keith. I agree that “sorting” would complicate things a bit. IMHO, most hierarchical lists are “designs” that adhere to a numeric or alphanumeric sorting algorithm while others are customized. For example, music genres could be sorted alphabetically, by date introduced, or by my “favorites” or…. So, yep, just a little bit complicated. šŸ˜‰

  12. Keith says:

    Custom post types can be hierarchical or flat. My plugin would have to differentiate the two different kinds. At the time that I wrote it, it seemed complicated, so I just treated all custom posts as flat. I since discovered that hierarchical custom pages can be displayed using the standard page API calls and treated like normal pages. I will, soon, go back and redo the plugin so it will choose sorted or hierarchical. You can’t choose the sort order for hierarchical, though, so it would complicate the plugin a little.

    Keith

  13. Quint says:

    Hello Keith,

    Your plugin looks promising. In an earlier post, you had mentioned that you would add “hierarchical post type” functionality to the plugin. Has this been done? I am using WPMU Dev’s Wiki plugin and it has a widget that displays an hierarchical list of wikis. The issue is that this list cannot be rearranged. WPMU Dev recommended I give your plugin a try. After installation and set up what you’re plugin displays is a list ordered per your plugin’s sort order; however, what should be a hierarchical list isn’t shown, just a plain, left justified list.

    Do you think I missed a step, or is a hierarchical list not possible? Thanks!

  14. Keith says:

    The expired posts plugin (exirator) uses extends posts to have an expire day. It seems like a useful idea, but it is not part of standard WordPress. I will look at it, but I am not sure that I would make many changes to support something that is not in the WordPress core.

    If you wanted to hack the code you could check for whatever meta information the plugin adds to the code and not display the line.

    Keith

  15. ArjandeV says:

    Hey Keith, nice plugin, is there a way I can exclude “expired” posts (see Post Expirer plugin).

    Thanks!

  16. Peter says:

    Keith … could not find an email for you, pls contact me at peter troxler gmx —dot— net for the diff

    (indeed it’s not too hard)

  17. Keith says:

    Send me the diff. It doesn’t sound to hard. I’ll include it in the next release.

    Keith

  18. Peter says:

    I wanted the option to include the title as the first option in the dropdown (instead of “Select Post”) … can I send you the diff?

  19. Zack says:

    Hello,

    This is a great plugin! Is it possible to exclude certain pages – similar to how you can do this in the “pages widget”? If so, that would be a tremendous help, I’ve been looking for a way to do this for hours and am stumped.

  20. Keith says:

    Buy the book (99 cents – cheap – for kindle) or place a link to one of my sites somewhere on your website and leave it there long enough to be crawled.

    Thanks,

    Keith

  21. Patricia says:

    Thank you!! This widget helped me a lot.
    Do you take donations?

  22. Andrew says:

    You’re a champ,

    Thank you very much.

  23. Keith says:

    I was trying to keep the plugin very generic. I will look into this and if it is not a big deal, I’ll add it.

    Keith

  24. Andrew says:

    Hey Keith,

    I was wondering if you looked at adding featured images for each post type. I’ve got a list of employees and I’d like to put their pictures by the list of their names in the sidebar.

    thanks

  25. Keith says:

    Yes, try it and see.

    Keith

  26. anxx says:

    HI, iā€™m a newbie, i would like to know if it is possible to display a custom field type along with title using this plugin

  27. teddy b says:

    Easy and great plugin! How can I modify it to display the content of the custom post type up to the More tag? I’d also like to display the published date. I’m making a Latest News widget. Thanks!

  28. chris2224 says:

    That’s great. Meant about donation – see you mention purchasing books. Might have a similar plugin needing developing for the site, so please email Thanks

  29. Keith says:

    I’ll take a look when I get back to work. It sounds easy enough.

    Keith

  30. chris2224 says:

    This is great. I have multiple authors, and have the widget on a page with author details, but want to pull a list of custom posts by that author (not a list of all custom posts. Is this possible?
    Happy to make a donation if you email me…been attempting to get this done for soooo long.

  31. Keith says:

    Can you give me an example.

    Right now, I do not display the custom posts as a hierarchy. I am not sure that I can list by taxonomy name without redoing some code. It might take an interesting sql query to get the right result, and I am researching it.

    Keith

  32. philippe says:

    HI, i’m a newbie, i would like to know if it would be easy to order the list by custom taxonomies??
    thanks

  33. sam says:

    hey,
    I have looking for so long for a plugin like this. Its really amazing. Just a couple thoughts on future additions to the plugin: Is there anyway, you can add the option to allow a summary of each post, page, or custom type? and maybe after that have an option to display a feature image (maybe based on the feature widget) to the right or left of the summary.

    I am trying to make something similar to this page https://myanimelist.net/anime.php – I don’t know if such a thing is possible. Tanks in advance

    In the page, I linked, it has different section. I wasn’t thinking of such a complicated thing, but only maybe the top part. With you plugin as it is now, I have my site working similar to the page I linked but no summary and no image.

  34. Keith says:

    I’m working on it. I need to release the next version which will have hierarchical custom post types. It needs a few weeks more work, though.

  35. lee says:

    Is there any way of displaying hierarchical custom post types with indents ie output nested lists?

  36. Keith says:

    I will fix it in the morning.

    Keith

  37. Cyd says:

    Great plugin. I really needed this. One quick question – how do I get it to select the first item in a dropdown list?

    The first custom post type in the list is selected by default, and therefore, can’t be selected, no matter what page you’re on.

    As an example, I’m using Taxonomy Widget to get all the terms under the Custom Post Type and the default there is “Please Choose”, so the problem is circumvented.

    (Your widget only gets entries by custom post type and his only gets entries by custom taxonomy, so I have to use both for right now.)

    I’m probably just missing something and would really appreciate your help.

  38. Keith says:

    Version 0.6 has the change you asked for. I just uploaded it. It should appear in the repository any minute now.

    Thanks,

    Keith

  39. Steve says:

    Keith, this is a really great plugin. I only have one request, can you offer an option for displaying just ONE post? I have a site where I want to use this plugin to rotate out quotes and only need one at a time to display and would rather not hack your plugin to do this. Could you let me know as soon as possible before I look for an alternate solution? Thanks!

  40. Nevin says:

    I am using Custom Post Type UI plug-in to create my custom post types. It has the ability to add a description for post types. Is there a way using your plugin I could display that description in the widget. My goal is to add a widget for each custom post type, display the description, and set the amount of latest posts. I’d be happy to pay you for this development.

  41. Keith says:

    Good thought. In the next release I have to put a date

  42. J says:

    Nice little plugin that works well. I made a slight mod to yours so as to allow for future posts — useful for event post types.

  43. Keith says:

    I was debugging and forgot to fix that line. I have since fixed it, but I did not change the version number. You must have downloaded it the first day.

    Either un-comment it in the code or download the latest version.

    I am sorry about that. I will probably find other mistakes in the next week and I will release a new version.

    It is not a good idea to release versions too often as people get upset.

    Keith

  44. Axel says:

    Great simple to use plugin!
    Is there any reason why “extract( $args )” on line 129 is commented out though ?
    This prevents the widget from being wrapped into before_header, after_header, before_title and after_title.

Leave a Reply