Support » Plugin: Posts Order » Oder by name

  • Resolved gordonlangley

    (@gordonlangley)


    Hello – thanks for the plugin. Really helping us out. I have a custom post type for ‘staff’ and I want to order them alphabetically by Last name. I normally do this by using orderby ‘name’ which is the slug or permalink.

    So

    Title: Gordon Langley
    Slug (name): langley-gordon

    Would it be possible to add ‘orderby name’ to your plugin.

    Thanks!

    https://wordpress.org/plugins/category-custom-post-order/

Viewing 4 replies - 16 through 19 (of 19 total)
  • Plugin Author Piotr Po

    (@potreb)

    Can you change ordering to by ID and copy sql query for me. I need to check this. Is very wired that solution doesn’t work.

    Works great…

    SELECT SQL_CALC_FOUND_ROWS ce2015_posts.ID FROM ce2015_posts INNER JOIN ce2015_term_relationships ON (ce2015_posts.ID = ce2015_term_relationships.object_id) WHERE 1=1 AND ( ce2015_term_relationships.term_taxonomy_id IN (132) ) AND ce2015_posts.post_type = ‘people’ AND (ce2015_posts.post_status = ‘publish’ OR ce2015_posts.post_status = ‘acf-disabled’ OR ce2015_posts.post_status = ‘private’) GROUP BY ce2015_posts.ID ORDER BY ce2015_posts.ID desc LIMIT 0, 10

    Hello?

    Is there a function I can use to stop your plugin from effecting a specific custom post type, (people) as I only need to order by slug for that custom post type. I am using order by ‘custom’ for the other post types and that works great!

    Hello

    Great news! Your update has fixed my issue with order by ‘slug’ – Many thanks for your hard work!!

Viewing 4 replies - 16 through 19 (of 19 total)
  • The topic ‘Oder by name’ is closed to new replies.