Giter Site home page Giter Site logo

colorlibhq / simple-custom-post-order Goto Github PK

View Code? Open in Web Editor NEW
30.0 11.0 22.0 1.42 MB

Order posts(posts, any custom post types) using a Drag and Drop Sortable JavaScript. Configuration is unnecessary.

Home Page: http://wordpress.org/plugins/simple-custom-post-order/

License: GNU General Public License v3.0

PHP 82.76% JavaScript 17.24%
wordpress wordpress-plugin wordpress-development

simple-custom-post-order's Introduction

=== Simple Custom Post Order ===
Contributors: silkalns
Tags: custom post order, post order, js post order, page order, posts order, category order, sort posts, sort pages, sort custom posts
Requires at least: 6.2
Requires PHP: 7.2.5 or higher
Tested up to: 6.3.1
Stable tag: 2.5.7
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl-3.0.html

Order posts(posts, any custom post types) using a Drag and Drop Sortable JavaScript. Configuration is unnecessary.

== Description ==

Order posts (posts or any custom post types) using a Drag and Drop Sortable JavaScript. Configuration is unnecessary. You can do directly on default WordPress administration.
Excluding custom query which uses order or orderby parameters, in get_posts or query_posts and so on.

This plugins is now supported and maintained by <a href="https://colorlib.com/wp/" target="_blank">Colorlib</a>.

== Installation ==

1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory
1. Activate the plugin through the 'Plugins' menu in WordPress

== Frequently asked questions ==

= A question that someone might have =

An answer to that question.

== Screenshots ==

1. Order Custom Posts
2. Order Posts
3. Settings

== Changelog ==

= Version 2.5.7 - 20.09.2023 =
* Security update fixing multiple issues
* Code cleanup for better performance

= Version 2.5.6 - 27.05.2021 =
Changed : Revert to 2.5.4

= Version 2.5.5 - 11.05.2021 =
Changed : Code Cleaning
Changed : Allow custom orderby in Block Preview ( #98 )

= Version 2.5.4 - 05.03.2021 =
Changed: Improved Performance ( #105 )

= Version 2.5.3 =
* Modified deprecated jQuery functions.

= Version 2.5.2 =
* Modified deprecated JQuery function to improve compatibility with Wordpress 5.5
* Fixed an issue where posts would be in reverse order after resetting the order

= Version 2.5.1 =
* Improve fix for post list table width when sorting is enabled ( thanks to gedeminas )
* Fix for admin ajax overriding queries ( thanks to igritsay )

= Version 2.5.0 =
* Fixed post list table width when sorting is enabled
* Review dismiss fix

= Version 2.4.9 =
* Fixed "Post order not saving"

= Version 2.4.8 =
* Add ability to reset order to post types

= Version 2.4.7 =
* Fix undefined index when ordering terms
* Added filter for post types args shown in settings page
* Added extra option for advanced view of post types

= Version 2.4.6 =
* Removed dashboard news widget


= Version 2.4.5 =
* Added 2 action hooks that trigger at `update_menu_order_tags` and `update_menu_order` ( https://github
* Fix issue with sorting (#49)
* Fix edit page layout when no item found

= Version 2.4.4 =
* Fix for slow javscript in admin( #46 )
* Fix database error( #36 )

= Version 2.4.3 =
* Minor UI update added toggles

= Version 2.4.2 =
* Fixed potential bug with other plugins
* Fixed table breaking on re-ordering when Yoast SEO installed

= Version 2.4.1 =
* Fixed translations

= Version 2.4.0 =
* Optimized our db queries ( https://wordpress.org/support/topic/update-optimization/ )

= Version 2.3.9 =
* Added button to dismiss the admin notice

= Version 2.3.8 =
* Fixed white screen ( https://wordpress.org/support/topic/white-screen-after-upgrade-to-2-3-6/ )

= Version 2.3.7 =
* Fixed white screen ( https://wordpress.org/support/topic/white-screen-after-upgrade-to-2-3-6/ )

= Version 2.3.6 =
* Fixed #3

= Version 2.3.5 =
* Fixed #12

= Version 2.3.4 =
* Removed deprecated function "screen_icon"

= Version 2.3.2 (17-03-2017) =
* Minor documentation and readme tweaks

= Version 2.3 (24-03-2014) =
* Fixed major bug on taxonomy and post order

= Version 2.2 (02-07-2014) =
* Fixed bug: Custom Query which uses 'order' or 'orderby' parameters is preferred
* It does not depend on the designation manner of arguments( Parameters ). ( $args = 'orderby=&order=' or $args = array( 'orderby' => '', 'order' => '' ) )
* Previous Versions Issues were Improved.
* Removed Taxonomy Sort( Will add in next Version :) )

= Version 2.1 (31-12-2013) =
* Prevent Breaking autocomplete

= Version 2.0 (22-11-2013) =
* Fixed Undefined Notice Error in wp version 3.7.1
* Taxonomy Activate Checkbox removed.

= Version 1.5 (25-07-2013) =
*  Fix : fix errors
*  Added Taxonomy Sort
*  Added Taxonomy Sort option In setting Page

= Version 1.0 (20-07-2013) =
*  Initial release.

simple-custom-post-order's People

Contributors

amadeuarderiu avatar andyluak avatar cristianraiber avatar gedeminas avatar giucu91 avatar glebkema avatar hsameerc avatar joanrodas avatar laranz avatar presskopp avatar przyb avatar puikinsh avatar razvanaldea89 avatar wiegertschouten avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple-custom-post-order's Issues

sitemap conflict

However when I activate it, it instantly makes my video-sitemap go blank (no results). The vide sitemap is generated by a Yoast plugin.
Any thoughts on why this plugin could break the sitemap?

Ignore the order of terms in the `include` parameter

The plugin does not allow to sort terms in the order specified by the include parameter of the get_term() function or the WP_Term_Query class.

$terms = get_terms( array(
	'include'     => '16,15,14',
	'orderby'     => 'include',
	'taxonomy'    => 'my_custom_taxonomy',
) );

While the plugin is deactivated, everything works correctly. But as soon as the plugin comes into play, it rearranges the terms according to the term_order.

does not work with duplicate page plugin

We also have this plugin installed: https://wordpress.org/plugins/duplicate-page/

It looks like: if we duplicate a post with the above plugin, the custom post order is no longer possible for the newly created post. (this duplicate plugin is also on the site for a year now)
When we hit the button ‘update’ under the custom post order settings, all works and we can move all posts around as we want.

As soon as we start adding new posts with the duplicator the problem starts again.

Yoast SEO conflict - breaks table

I was experiencing an issue where the table breaks when re-ordering any custom post type or page. I seen a support thread here with the same issue conflicting with ACF plugin which was resolved. Anyway, i tested all plugins and the culprit this time is Yoast SEO Plugin.

Conflict with SearchWP

Your plugin is really great, but so is SearchWP. They don’t play nice together. SCPO disables SeachWP from working completely. Here’s the notice SearchWP provided to detect the problem:

SearchWP has detected a potential (not guaranteed) action/filter conflict with pre_get_posts caused by an active plugin or the active theme

The following Hooks (put in place by other plugins or your active theme) may be contributing to the problem:
wpuxss_eml_pre_get_posts (function)
scporder_filter_active (method) in SCPO_Engine (class)
scporder_pre_get_posts (method) in SCPO_Engine (class)

Is there any way around this conflict? I’d love to be able to use both plugins if at all possible. Thank you!

get_next_post() and get_previous_post() taxonomy patameters are ignored

get_next_post() and get_previous_post() functions work well as long as they’re used without parameters. If taxonomy parameters are provided, for example get_next_post(true, '', 'my-taxonomy') which should query the next post that belongs to the same taxonomy term as the current one, then a result of a function call is the same as if the function was called without any parameter.

So, it seems that there’s something wrong with the get_next_post_where and the get_previous_post_where filter.

.

.

Reset Order

a way to reset the order, so that it’s ordered by date again but I can still drag-and-drop to reorder

Please follow this

Once these ^ hit WP Core, issues like the ones we've encountered recently with Simple Custom Post Order ( updates version: 2.3.6/7 ) won't happen again. WordPress already recommends PHP 7.x and above (actually 7.2 and above as of today) and anything lower shouldn't be supported. Heck, PHP 7.1 isn't actively supported since 1st of December, 2018 (only security releases until 1st of December 2019). PHP 7.2 is the new norm.

Some of these tickets were supposed to hit with WP 4.9.9 but alas, we're getting 5.0 without these tickets. Hopefully, 5.1 gets these much needed WP/PHP version checks into core.

This is something that should be followed closely and implemented for all of our plugin network @giucu91.

'menu_order' value wrong after deleting a post.

After deleting a post, and then creating a new post
the first row menu_order value is no longer 1 but 0.
And the second row menu_order is 2.

I experienced this behaviour on both the standard page post type and a custom post type.

Wordpress v 4.9.8.
Plugins installed:

Add Featured Image Column
Better REST API Featured Images
Custom Post Type UI
Regenerate Thumbnails
REST API Toolbox
Simple Custom Post Order

Thank you for your work with this plugin!

Sort order will not allow drag and drop in admin

URL : base_url/wp-admin/edit.php?post_type=press_releases
is working allows drag and drop but When I added sort

URL : base_url/wp-admin/edit.php?post_type=press_releases/orderby=menu_order&order=desc is not allow drag and drop. drag is in active.

I need to set order sort in admin too same as in front so I can manage my nreaking news,

Plugin generates PHP Warning

The plugin now creates the following error when WP_DEBUG is turned on:

Notice: get_screen_icon is deprecated since version 3.8.0 with no alternative available. in C:\wamp64\www\client\greenchameleon\wp-includes\functions.php on line 3856

This error appears on admin.php?page=scporder-settings

order duplicate titles

We’re using this to control the order of Staff litings – each staff member person is a custom post type with their surname as the title of the post.

The plugin is working well EXCEPT – we have both an Andy Davis and Dana Davis. We need Dana to be listed first, but when we switch them on the backend, they always display with Andy first.

The posts have different slugs (‘a-davis’ and ‘d-davis’) and if we move Dana further up the list, she is ordered correctly.

SCP is breaking post administration in mobile browser

If I load WordPress admin on mobile browser and go to Posts listing, I am unable to do anything. If I try to tap on article or to edit/delete/any other link there, it just activate dragndrop function. SCPOrder is just taking over and blocks any attempts to click on any function on article.

Any chance to fix it? May be exception for mobile browsers disabling dragndrop functionality, or some button next to post listing which enables/disables it?

Breaks next/prev links with WPML

it breaks next/prev post navigation with WPML.

get_next_post() will return the same post in a different language, instead of the next post in the same language.

Taxonomy order broken – Missing Column term_order in table terms

After a general update run, including this plugin (to v2.4.4) and WordPress (to v5.2.1), the column “term_order” in table “terms” disappeared. Update order was: first the plugin(s) then WordPress.
Consequence: Taxonomy order was broken (of course..)
Solution: In phpMyAdmin, I had to manually add again column “term_order” to the table “terms”.

Versione 2.3.6 is broken

After upgrade to 2.3.6 my site became all a blank pages.
Renamed folder into simple-custom-post-order_old it start again.
I tried to download new copy of plugin but it's impossibile to activate.

ACF field groups ordering

Advanced Custom Fields (which is really popular, I’m sure you know) post type Field Groups has it’s own custom menu, so it doesn’t show in your settings.
Had to comment ‘show_in_menu’ argument in your plugin to be able successfully order those Field Groups.

$post_types = get_post_types(array(
'show_ui' => true,
//'show_in_menu' => true,
), 'objects');

Field Groups appeared in settings and sorting is working as it should now. Maybe you need to add additional setting or at least apply a filter for users to be able to change that argument without commenting plugin’s code?
I guess this could be useful for other plugins too.
What do you think?

paging – reording items in second page cases incorrect order

This is for custom post type custom taxonomy.

I have very many items and I cannot increase page size so that everythign fit into one page.

When I modify oder on second page (for instance, moving element on top) all ordering is broken. This item becomes the number one (even if it is on second page).

Interferes with default WooCommerce sort

When I have the plugin enabled (versions 2.4.4 or 2.4.5), My WooCommerce category pages (not the main shop page) always want to order by latest, even though I have it set to order by popularity. If the user re-sorts using the drop-down on the front-end, it works, but I want to sort by popularity by default, on page load. I’ve deactivated the plugin for now, which eliminates the issue.

feature request child/parent pages

using your nice plugin I’ve considered that should be usefull
sorting automatically a child page UNDER the parent when you nest it

It would be great if in case you have to switch it back as a not nested page
the “undo” process could restore the previous order before the child-parent status was set

Database error do_action(admi_init)

Query:
UPDATE wp_posts as pt JOIN (
SELECT ID, (@row_number:=@row_number + 1) AS rank
FROM wp_posts
WHERE post_type = ‘product’
AND post_status IN ( ‘publish’, ‘pending’, ‘draft’, ‘private’, ‘future’ )
ORDER BY menu_order ASC ) as pt2
ON pt.id = pt2.id
SET pt.menu_order = pt2.rank;

Caller:
do_action(‘admin_init’)

Component:
Core

Error message:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘rank FROM wp_posts WHERE post_type = ‘prod’ at line 2

Error code:
1064

https://wordpress.org/support/topic/database-error-do_actionadmi_init/

reordering posts

I am finding that the plugin will often leave posts with the same order value as other posts after dragging, which means they won’t necessarily actually be in the correct order. Here’s a video of me trying to reorder some posts:

https://www.dropbox.com/s/shgxcn39dhpl19z/SCPO.mov?dl=0

Twentyseventeen with a CPT created with Pods. I drag and drop to reorder, then reload the page to see if the order will stick.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.