WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Quotes Collection] List all quotes by AUTHOR? (4 posts)

  1. 84adam
    Member
    Posted 4 years ago #

    I've just created my very own quotes page with the
    [quotes|all] code, but I see that they are ordered by the first letter of each quote. Any ideas as to how I can list them by author alphabetically?

    Obviously I could list them myself by writing the author code [quote|author=Somebody] for each author, but this would not update/maintain itself automatically...

    Here's my page just in case: thrive quotes

    Thanks.

    http://wordpress.org/extend/plugins/quotes-collection/

  2. SriniG
    Member
    Posted 4 years ago #

    You can accomplish that by making a little edit to the quotes-collection.php file.

    On line 799 of the quotes-collection.php (v1.4.1) you will find the code

    $sql .= "ORDER BY quote";

    replace it with

    $sql .= "ORDER BY author, quote";

    Be aware that automatic upgrade of the plugin to newer version will overwrite the old file, so your edits will be lost. You'll have to re-edit when you upgrade.

  3. 84adam
    Member
    Posted 4 years ago #

    Perfect! Thanks.

  4. jbhelfrich
    Member
    Posted 3 years ago #

    I just used this fix on the newest version of the plugin (it was a couple lines later) and I noticed a bug. One of my quotes was appearing at the top of the list both in the quotes page, and in the Quotes admin, when sorted by author, even though the Author's name started with an H. Eventually, I figured out that there was a tab character at the start of the quote, which was pushing it to the top of the list. Not sure if that's something that can be fixed in your code or not, but figured I'd mention it.

Topic Closed

This topic has been closed to new replies.

About this Topic