Ready to get started?Download WordPress


Display Posts Shortcode
Not Ordering by Custom Field? (1 post)

  1. sheabaker
    Posted 8 months ago #

    We added a "weight" field to a custom post type so that we could manually set the order that the lists displayed by the short code would work. However, it does not seem to be registering it and is defaulting to another ordering system.

    An earlier post showed stated that you could order by a custom field and just used it in the orderby argument. But that is not working for me.

    We are using "Advanced Custom Fields 4.2.2" to generate the custom post type fields.
    The field name is "weight" and the short code we tried is:
    [display-posts post_type="program" taxonomy="program_taxonomy" tax_term="3-hockey" order="ASC" orderby="weight" posts_per_page="-1"]

    What are we missing?
    Thank you.



You must log in to post.

About this Plugin

About this Topic