Forums

What's wrong with my sorting function? (3 posts)

  1. Solkis
    Member
    Posted 5 months ago #

    Hi friends,

    I've just joined in as a plugin developer (as a robby) and I'm having some problems with sorting a custom column I created. I'll explain it better:

    I created a new column in wp_posts name wcc_words, and I created a new column in the posts view to show the value and I want this new column sortable, so I added this code to do it all:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    The only prolem is the sorting, it's sorting by the post title, not by the column I specified. What should I add as orderby parameter? The name of the column, the name of the column in the database...

    Name of the custom column I created with manage_posts_columns: wcc_column
    Name of the new column in wp_posts: wcc_words

    Best regards. :)

  2. Solkis
    Member
    Posted 5 months ago #

    UP

  3. Solkis
    Member
    Posted 5 months ago #

    No problem, here you are with Pastebin:
    http://pastebin.com/QHNnyFRu

Reply

You must log in to post.

About this Topic