Sort WordPress custom post types through Front End

Share on FacebookTweet about this on TwitterShare on Google+Share on LinkedInPrint this page

This will allow you to create custom sort lists through the Front End of your site.
This is a sample of how the sort interface will appear:
front-end-sort-of-custom-post-type

During the last years the WordPress become one of the best Content Management System, the features and a great interface, also the ease of usage makes the best environment for a serious website. There are certain functionality which is not available either planed to be implemented giving the complexity, the Advanced Post Types Order plugin got the content management a step further and fill a gap in the WordPress core by implementing the possibility to sort any custom post types. We all know how important is the data and texts positioning on front site, as this will make the difference of retain a visitor interest or make it go away. Time is an important aspect for everyone, so making the important things show first will be a huge benefit all.

Recently the Advanced Post Types Order got an important update, any sort type is now possible through front end. This is an important feature for those who do not allow users to access the admin interface. The feature is available in a form of WordPress shortcode which can be used within any page, post or any custom post type, like a regular shortocde.

The shortcode format has been updated since V3 series, if you own an older version please update or check Sort WordPress custom post types through Front End – V2 series instead.

Sample Usage
[apto_reorder sort_id="82"]

Attributes

sort_id *required Output the interface for a given sort list id.
Example
[apto_reorder sort_id="82"]

hide_archive This will hide the Archive sort type from the interface. Only the taxonomies will be show for re-order.
Example
[apto_reorder sort_id="82" hide_archive="true"]

The interface will look like this:
front-end-sort-of-custom-post-type-single-taxonomy-term

capability The required capability of a user which will be allowed to create the sort. If the user role does not contain that attribute, nothing will be output. For more details about user capabilities and allowed caps see Roles and Capabilities
Example
[apto_reorder sort_id="82" capability="edit_pages"]
This shortcode will allow to sort for Editor role and up.

Similar to admin interface, For a given selection, a manual drag and drop capability is available or automatic through which order by ID, name, random, date, custom fields, etc will automatically apply:

front-end-sort-of-custom-post-type-automatic-order


  • Sasha

    Except the default capabilities at http://codex.wordpress.org/Roles_and_Capabilities can i use custom defined?

    • nspcode

      Any WordPress capability can be used.

  • brkard

    hi..
    ıs there way to hide taxonomies.
    I want to reorder all posts without selecting taxonomies from front-end

    Thanks

    • nspcode

      Hi,
      You can use something like this [apto_reorder post_type="post" hide_archive="true" taxonomy="category" term_slug="entertainment"] . Change the taxonomy and term_slug with your data and the front side interface will hide the taxonomies selection and just show the posts which belong to specified taxonomy term.

  • brkard

    hi..

    ı want to hide some pages on frontpage reordering.

    for example i have a login page. but i dont want user to see and reorder this page on frontend. How can i do that. Can you help me about this ?

    • nspcode

      Hi, currently this can’t be done. We will add a filter for this area query in a later version.

  • Ivano Tamaggio

    Hi, i need that registered users can see our created posts, and can sort these post with category created by themselves. It’s possible? Or this plug works only with admin? Thanks

    • nspcode

      Hi,
      As admin you can set the user capability for a particular sort, which can view and change the order of objects. This works for both side (admin and front side), you just need to use the shortcode described on that page.
      If need to allow only categories created by those users, you will need a small code extension:

      1) On a category create, record the author (as default WordPress does not save that piece of information). You can use the filter ‘created_term’

      2) Use the apto/admin/sort-taxonomies filter to allow only certain taxonomies to be show for the user http://www.nsp-code.com/advanced-post-types-order-api/filter-admin-restrict-certainall-taxonomies-for-a-sort/

      Thanks

      • Ivano Tamaggio

        OK, but each user should only see his posts: it’s possibile?
        In few words, i need little private area where user can see ,order and sort his post manually (i need user can aggregate, grouping his post according to custom criteria)

  • nspcode

    Hi,
    Yes you can do that, however it does not make too much sense to do so, unless on front side you use such query e.g. display only media uploaded for a specific user within a post.

    Thanks