Comments

  • PP

    Would it be possible with this plugin to do such a tricky sorting:
    1) sort posts tagged with one special word alphabetically (a-z),
    2) sort the rest (or tagged with another special word) alphabetically (a-z) based on the last word of the title.

    It would be a great help for my open project.

  • PP

    …the idea is I’ve got both people (first name second name) and institutes (just name) so I’d like people to be sorted with their last name, which is sorta… last in the title.

  • Gabriel

    Hi there, pp.

    Well, first of all, a much simpler solution to your problem would be to create two separate child-categories, one for people and one for institutions.

    And secondly, yes the type of sorting you are suggesting would be a bit tricky. So, while we will consider adding this feature in a future release, we can’t promise anything.

    Good luck with your project,
    Gabriel

  • Gabriel

    The thing is, our sorting method is closely tied to the MySQL sorting.

  • PP

    Thanks for such a prompt reply. The reason I ask for this functionality is that the site is kind of a index, where a user can pick for example “psychotherapy for families” + “a city” and the system shows both individual psychotherapists and psychotherapy centers in the same listing — hence the idea to mix both types of sorting. I understand it is probably very specific system…

  • Great plugin – just what I was looking for. Been hunting high and low for a plugin as simple as this that works with 2.7 so great job. Thanks again. Dare to Share

  • Gabriel

    :) Thanks. Glad to be of service.

  • Marc

    Could you turn this into a “Post of the day” plugin that would randomly pull a post from a category and display using the “Excerpt” in 2.7?

  • Gabriel

    Hmmm… Please elaborate a little. Where would that “Post of the day” thing occur? Instead of the regular category display? If so, how would the user be able to see all the posts?

  • I’ve installed this plug-in on a blog in WPMU. The basic Default sort drop-down appears, but the categories option is not populated. I suspect this is due to the fact that in WPMU, each blog has it’s own unique taxonomy table, unlike the single table in WP.

    Any idea if there is a work-around for this? (We’re running WPMU 2.6.3)

    Thanks

    Brian

  • Gabriel

    So how do plugins work for WPMU ? Do you install them for all users, or just for one user?

  • Gabriel

    Oh, I see, you have installed it on a single blog in WPMU.

    You can try to edit the plugin and replace all instances of wp_tablename with wp_”n”_tablename, where “n” is the blog ID.

    Maybe that will work.

  • Marc

    Would be great to see one post displayed randomly in the sidebar on a daily basis. It could pull a random post a day from a specific category or tag to display with a title, the excerpt, and a link (or the title could be the link to the original post). I think it would be a great way to give users a chance to see random or older posts on a daily basis that they might not normally go searching for. Also, it could be used as a ‘quote of the day” plug which can pull from a category. Think it can be done?

  • Gabriel

    Yeah, it’s a great idea for a plugin (or a widget, actually).

    But I’m sorry to say that it’s not what our plugin is for. As it’s name suggests, our plugin is for sorting posts, and we’d like to keep it as simple as possible. Apparently this is what people are looking for.

    When it comes to WP plugins, swiss army knives don’t seem to be very popular.

  • In fact both – but in this instance, we have only enabled it for a single blog.

  • I’d more or less arrived at that conclusion, andI may do this as a quick fix, but ideally I’d like to have the plug-in automatically become aware of which blog it is in, and adjust the table names dynamically to suit. I’ll need to dig into the WPMU Codex to find out how this is done. If I find out, I’ll post the answer back here.

    Thanks

    Brian

  • Gabriel

    Cool. Thanks.
    We will definitely do something about the WPMU thing sometime in the future. :)

    Cheers
    Gabriel.

  • So what about sorting post within categories on tags? You think this is possible?

  • Gabriel

    yup, it’s clearly possible, although a bit tricky.
    it would be very useful. it’s been on our to-do list from the beginning.

    so, now i’m appending the to-do list to the post.

  • Hi-
    First, GREAT plugin! Just what I was looking for… Nothing too complex, nor too simple. Thank you for this!

    Second, I was having some performance issues on site. I installed a tuner plugin, and it returned that there is an error in the SQL query for this plugin. I thought I’d run it by you to get your thoughts…

    The text of the error is:

    6) Query: [wp-content/plugins/wp-post-sorting/wpps_hook_posts_orderby.php(14): wpdb->get_row()]
    SELECT * FROM wp_post_sorting WHERE category =
    Error in query:
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ” at line 1
    Query time: 0.4821 (ms)

  • Nevermind… I just figured out why the error…. Noob mistake. It was because I was on the index page where there *are* no categories.

    Thanks again for an awesome plugin!

  • Gabriel

    :) You’re welcome, Brian.

  • Gabriel

    You know, I found and installed that “WP Tuner” plugin, (which is great by the way) and I also got that SQL error. It apparently was a minor bug, but now it’s fixed.

  • If I have another kid, I think I’ll name him Gabriel.

    Thanks!

  • Gabriel

    LOL:))

  • Ray

    Hi Gabriel,
    I use your plugin and love it. One question I have. When I do WP_Query in my home.php for a specific category, it does not use the sort order specified for the category that was entered from WP Post Sorting plugin.

    Is there a way I can make a query to leverage the settings that WP Post Sorting has for a particular category. In other words. Something that would replace this query and use the settings for the category:

    have_posts()) : while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID;
    ?>

  • Ray

    Sorry.. that query didn’t display too well…. anyway, the heart of the query is:

    WP_Query(category_name=events)

  • Hello Ray,

    I’m afraid to say I don’t know of any way you can do it.

  • When is the next version coming out?
    I think it should have the custom fields and also a
    tag that allows users on the website to sort posts.

    Two drop downs would be nice, one having all the chosen custom
    fields as well as title, and date… and the second one where the
    user can select the order: decs, asc… and if u really wanna go all
    out… have it so you can control everything! =)

    Nice plugin by the way.

    Thanks

  • Gabriel

    Yeah, the new version will definitely have sorting by custom fields, but unfortunately, this requires rewriting the entire plugin from scratch, and we’re a bit tied up at the moment.

  • Rob

    I am not getting this to work. any suggestions?

  • Gabriel

    I am going to need a bit more info. What WordPress version are you using? Are you sure you activated the plug-in? Did you go to Posts >> Post Sorting? Is the category list there populated or not? Did you get any errors? Stuff like that.

  • Wanted to thank you for this awesome and simple plug-in; on my blog, I have categories for movie/book/game reviews, and it is awesome to be able to show only those categories sorted by title!

    In my particular case, I wonder if it is possible to exclude the word “The” from sorting when it appears at the beginning of the title — for example, so that a title like “The Lord of the Rings” would sort under L instead of T.

  • Gabriel

    It’s certainly possible, but it would take a fair amount of work. And unfortunately we’re a bit tied up at the moment.

  • ric

    This might sound silly, but where does it sort posts? where is the sort displayed?

    And, most, importantly, why do I have to ask this question?

  • Gabriel

    Hey, Ric

    I think you might find this screenshot quite relevant.

    Cheers, Gabriel

  • Hi Gabriel,

    Thanks for developing this plugin!

    It only seems to work for posts filtered in one category. For me, that’s not so interesting.

    I would be really interested to have articles sorted by post title:
    > For ALL postings, (the …. /wp-admin/edit.php landing page)
    > If I filter ther articles by author (I choose one author and display all his / her posts)

    Is this possible? Thanks a lot!

  • Hello Bart,

    Yeah, it’s possible, but it’s not what the plug-in is doing right now. We might add this functionality in a future version.

    Good luck,
    Gabriel

  • Thanks for your super-quick reply! Too bad…

  • hi gabriel

    i am wondering if you might be able to advise as to how i might sort by title on the single post template level in wp 2.7.x? there appears to be no such parameter for the previous_post_link and next_post_link template tags but that is ‘where’ i would like to implement …

    any suggestions would be VASTLY appreciated :)

    thanks much.

    – joyce lukaczer

  • The first way that comes to mind is editing the get_adjacent_post function. You can find it in wp-includes/link-template.php

    Take a look at line 901. You can change “ORDER BY p.post_date” to “ORDER BY p.post_title”

  • guest

    Great plugin. Thank you !

  • Works great, thank you

  • Gabriel

    You’re welcome. I’m glad it helps :)

  • This plugin would be a perfect fit for a project I am working on if it would sort not just category posts, but tag posts as well.

    But your plugin is a big improvement on Alphabetical List, since you can choose a default order for all categories, and override that for certain ones.

  • Excellent. Just what the doctor ordered.

  • Gabriel

    Great suggestion. I’m adding it to the To-Do List. Thanks.

  • Hi, great plug-in……..

    although I was looking for something that would actually order the database table everytime a category received a new record,…. so specifically, the Next_link and Previous_link tags would be sorted….

    I have a category of ‘artists’ and when I’m looking at the single post (single.php), I want the next/prev link at the top to show the next/previous in alphabetical order within the category.

    Does your plug-in do this and am I missing how to do it? If not, please add this to the wish list (!) … also, so that the category list in the side-bar will work in alphabetical order… that is until I figure out how to write my own widget!

    Meanwhile, many thanks for sharing your work :)

  • The next/prev sort order is hardwired into WordPress.

    See wp-includes/link-template.php

    Look at the line starting with “$sort =”

  • Is this plug-in working with 2.8? I’m using WP 2.84, PHP 5.
    I’m trying to sort several categories alphabetically but no matter which way I try, ascending or decending, I end up with reverse alphabetcial, z-a
    I also have several child categories, could that be the problem?
    This plug-in is exactly what I need if it would work. Actually, it does work… just in reverse order. If necessary I’ll leave everything backwards and pretend I meant to do that. LOL
    Thank you so much for the plug-in, I have searched and searched for a way to get posts to sort alphabetically and reverse is better than nothing by far.

15 Trackbacks

  1. [...] WP Post Sorting [...]

  2. [...] WP Post Sorting [...]

  3. [...] WP Post Sorting [...]

  4. [...] WP Post Sorting [...]

  5. By Reflection Media. Finally here. | Cozmoslabs on December 11, 2008 at 11:35 pm

    [...] Gabriel made his first plugin for WordPress, WP Post Sorting. This plugin allows sorting of posts by Post Title (ascending or descending) or Post Date [...]

  6. By WordPress Plugin Releases for 12/11 | BlogBroker24-7 on December 12, 2008 at 2:06 am

    [...] WP Post Sorting [...]

  7. [...] WP Post Sorting [...]

  8. By WordPress Plugin Releases for 12/11 | Web Design Abyss on December 12, 2008 at 10:14 am

    [...] WP Post Sorting [...]

  9. [...] WP Post Sorting [...]

  10. By WordPress Plugin Releases for 12/11 on December 13, 2008 at 4:10 am

    [...] WP Post Sorting [...]

  11. By WordPress Plugin Releases for 12/11 | HLBV on December 13, 2008 at 10:21 pm

    [...] WP Post Sorting [...]

  12. By Skuzzed.com » WordPress Plugin Releases for 12/11 on December 13, 2008 at 11:15 pm

    [...] WP Post Sorting [...]

  13. [...] “WP Post Sorting” Plugin | Reflection Media This plugin allows sorting of posts by Post Title (ascending or descending) or Post Date (ascending or descending), customizable for each category. (tags: wp plugins sort) [...]

  14. By Dezvoltatori români de pluginuri wordpress on September 24, 2009 at 9:02 am

    [...] traducerea wordpress în limba română pentru versiunea curentă și fac o treabă bună, au creat WP Post Sorting Plugin și un plugin care “vorbește” cu tine, Talky [...]

  15. [...] WP Post Sorting: a plugin to list entries in alphabetical order on letter listing pages [...]

Leave a Reply