Entry tags:
Wordpress woes
a couple of weeks back, I posted asking if anyone knew of a Wordpress plugin that would sort posts by a custom field. There were a few suggestions, but unfortunately none of them do exactly what I need to do which, admittedly, I hadn't been clear about in the post.
What I need is a way to produce a list of post titles that have been sorted by a custom field, and to stick that list into a sidebar. This is being used to produce an alphabetized list of panelist names, hopefully to be sorted by last name. For example:
Barack Obama
Jane Doe
Genjyo Sanzo
John Doe
John Roe
L. Lawliet
Mihael Keel
Mail Jeevas
Quillsh Wammy
Minekura Kazuya (last name first, notice)
Rahm Emmanuel
Those are in the order the posts were entered, with the name of the person serving as the title of the post. Sorting by the title produces a list alphabetized by first name (or in the case of Minekura Kazuya, sorted by last name, since it's first in her language.)
I can make a custom field called "Alphabetize" or something where we can enter the name in in the order it should be alphabetized: Obama Barack, Lawliet L, Minekura Kazuya, Wammy Quillsh, etc. So I end up with:
Jane Doe
John Doe
Mail Jeevas
Mihael Keel
L. Lawliet
Minekura Kazuya (last name first, notice)
Barack Obama
Rahm Emmanuel
John Roe
Genjyo Sanzo
Quillsh Wammy
If there's a plugin that sorts by custom fields and produces a list of the *real* titles that I can *post to a sidebar*, I'd love to know.
Otherwise, I'm writing the damn thing.
ETA: The problems I'm seeing with the suggested plugins is that they produce a separate index page, not a list I can pop in elsewhere, and in the case of one of them, the list it produces uses the custom field as the list item, which defeats the purpose: if I was OK with that, I could just use Lastname Firstname as the post title, sort by that, and be done with it. Or they sort the posts ... as in the posts themselves, not a display of the titles. If that makes sense.
What I need is a way to produce a list of post titles that have been sorted by a custom field, and to stick that list into a sidebar. This is being used to produce an alphabetized list of panelist names, hopefully to be sorted by last name. For example:
Barack Obama
Jane Doe
Genjyo Sanzo
John Doe
John Roe
L. Lawliet
Mihael Keel
Mail Jeevas
Quillsh Wammy
Minekura Kazuya (last name first, notice)
Rahm Emmanuel
Those are in the order the posts were entered, with the name of the person serving as the title of the post. Sorting by the title produces a list alphabetized by first name (or in the case of Minekura Kazuya, sorted by last name, since it's first in her language.)
I can make a custom field called "Alphabetize" or something where we can enter the name in in the order it should be alphabetized: Obama Barack, Lawliet L, Minekura Kazuya, Wammy Quillsh, etc. So I end up with:
Jane Doe
John Doe
Mail Jeevas
Mihael Keel
L. Lawliet
Minekura Kazuya (last name first, notice)
Barack Obama
Rahm Emmanuel
John Roe
Genjyo Sanzo
Quillsh Wammy
If there's a plugin that sorts by custom fields and produces a list of the *real* titles that I can *post to a sidebar*, I'd love to know.
Otherwise, I'm writing the damn thing.
ETA: The problems I'm seeing with the suggested plugins is that they produce a separate index page, not a list I can pop in elsewhere, and in the case of one of them, the list it produces uses the custom field as the list item, which defeats the purpose: if I was OK with that, I could just use Lastname Firstname as the post title, sort by that, and be done with it. Or they sort the posts ... as in the posts themselves, not a display of the titles. If that makes sense.
no subject
no subject
What I'm using right now to produce the list of panelists on the website is a plugin called Sobek's Posts by Category which *might* be able to be altered to sort by a custom field, but I'd have to (a) look hard at his coding and (b) see if he allows for altering his code in his open-source license.
no subject
http://codex.wordpress.org/Function_Reference/get_post_custom_values
...or this:
http://codex.wordpress.org/Function_Reference/get_post_custom_keys
Seems like if you could get a list of the values in the custom field, PHP could do the sorting within the template.
no subject
I think it looks like it would be a place to start coding my own plugin. :) (Might as well make it a plugin, instead of hard-coding into the template, so I could easily pop it into any template I needed it in.)