Sort WordPress custom post types through Front End
The Advanced Post Types Order plugin now allows you to create custom sort lists directly from the front end of your site. This feature provides a seamless experience for users who do not have access to the WordPress admin interface, making content management more accessible and user-friendly.
Front-End Sort Interface Overview
When enabled, the sort interface will appear on the front end of your site, allowing users to easily reorder content. Below is an example of how the interface might look:
Enhancing Content Management with Advanced Post Types Order
WordPress has evolved into one of the most powerful Content Management Systems (CMS) available, thanks to its rich features, user-friendly interface, and ease of use. However, certain advanced functionalities, such as sorting custom post types, are not natively supported by WordPress. The Advanced Post Types Order plugin fills this gap, allowing you to organize and prioritize content on your site, which is crucial for retaining visitor interest and improving the user experience.
Front-End Sorting: A Significant Update
With the recent update to the Advanced Post Types Order plugin, any sort type can now be managed directly through the front end. This feature is especially valuable for sites where users are restricted from accessing the admin interface. The sorting capability is available through a simple WordPress shortcode, which can be added to any page, post, or custom post type.
Example Shortcode Usage
To implement front-end sorting, use the following shortcode format:
Example
[apto_reorder sort_id="82"]
Attributes
sort_id
(required): This attribute specifies the sort list ID for which the interface will be generated.
Example
[apto_reorder sort_id="82"]
hide_archive
: When set totrue
, this attribute hides the Archive sort type from the interface, displaying only the taxonomies for reordering.
Example
[apto_reorder sort_id="82" hide_archive="true"]
The interface will look like this:
capability
: This attribute defines the user capability required to access the sort interface. If the user role does not have the specified capability, the sort interface will not be displayed.
Example
[apto_reorder sort_id="82" capability="edit_pages"]
In this example, only users with the capability to edit pages (e.g., Editors and Administrators) will be able to access the sort interface. For more details on WordPress user roles and capabilities, refer to the Roles and Capabilities documentation.
Manual and Automatic Sorting Options
Similar to the admin interface, the front-end sort feature provides both manual and automatic sorting options. Users can manually drag and drop items to reorder them, or choose automatic sorting based on various criteria such as ID, name, random order, date, or custom fields.
By utilizing the front-end sorting feature of the Advanced Post Types Order plugin, you can enhance the content management experience for your users, streamline the process of reordering items, and ensure that your site’s most important content is always displayed prominently.
Except the default capabilities at http://codex.wordpress.org/Roles_and_Capabilities can i use custom defined?
Any WordPress capability can be used.
hi..
ıs there way to hide taxonomies.
I want to reorder all posts without selecting taxonomies from front-end
Thanks
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.
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 ?
Hi, currently this can’t be done. We will add a filter for this area query in a later version.
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
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 https://www.nsp-code.com/advanced-post-types-order-api/filter-admin-restrict-certainall-taxonomies-for-a-sort/
Thanks
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)
Yes, this is possible by setting-up an advanced sort setting see this article https://www.nsp-code.com/advanced-post-types-order-description-and-usage/create-sort-for-mix-of-single-multiple-custom-post-types-taxonomies-meta-authors/ So you will also add the author parameter within the interface. Probably you will need such sorts to be created automatically upon user create, so you don’t have to do it manually.
However there will be a problem when displaying all objects from all users, since there’s no criteria to place certain user posts in front of others, it will just list as default (e.g. date). Obliviously this will work fine, if intend to use only for sections where to list individual users posts.
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
I have CPT Video and Article that use same category alongside with default wordpress posts. Can i manualy sort all three post types within one category?
Yes, this is possible, see this description for an example https://www.nsp-code.com/advanced-post-types-order-description-and-usage/create-sort-for-mix-of-single-multiple-custom-post-types-taxonomies-meta-authors/
Thanks!