Simple Page Ordering

Descrizione

Ordina le tue pagine, i tipi di contenuto personalizzati o i tipi di post personalizzati aventi gli attributi di pagina con un semplice “trascina e rilascia” proprio dall’elenco delle pagine di WordPress.

Basta trascinare e rilasciare la pagina nella posizione desiderata. Nient’altro. Non ci sono nuove pagine di menu di amministrazione, goffe e sovrapposte alle interfacce utente. È sufficiente trascinare e rilasciare gli elementi nella schermata delle pagine o dei tipi di contenuto.

Il plugin tiene conto dei permessi: solo gli utenti con i permessi di modificare le pagine degli altri (editori e amministratori) potranno riordinare il contenuto.

L’aiuto in linea è incluso: basta fare clic sulla scheda “Aiuto” posta in alto a destra della schermata.

Nota che il plugin non è compatibile con Internet Explorer 7 e versioni precedenti, a motivo dei limiti di questi browser.

Come contribuire

Saremmo molto lieti se ti unissi a noi nello sviluppo su GitHub.

Screenshot

  • Spostamento della pagina nella sua nuova posizione
  • Indicatore di processo

Installazione

  1. Installa tramite la directory dei plugin di WordPress.org oppure caricando i file sul tuo server.
  2. Attiva il plugin dal menu “Plugin” in WordPress.
  3. Torna all’opera e riordina i tuoi contenuti!

FAQ

Perché non posso riordinare i miei articoli?

Gli articoli generici non vengono visualizzati per ordine di menu, ma per cronologia. In teoria puoi aggiungere l’ordinamento per menu agli articoli nel tuo codice (functions.php del tema, plugin) utilizzando:

add_post_type_support( 'post', 'page-attributes' );

Posso far sì che i miei tipi di contenuto possano sfruttare questo plugin?

Yep. When you register the post type, include the page-attributes feature in the support list. This will add a Sort by Order option to the filter links above the drop downs. Once you sort by order, you can drag and drop the content.

'supports' => array( 'title', 'editor', 'page-attributes' ),

Alternatively, when you register the post type, set hierarchical to true – hierarchical post types natively order by menu order.

You can also take advantage of the simple_page_ordering_is_sortable filter, which passes the result of the default check and the post type name, to override default behavior.

Desidero che i miei tipi di contenuto non gerarchici siano ordinabili. Aiuto!

Vedi le due precedenti risposte: ti basta aggiungere page-attributes all’elenco di funzionalità supportate per il tipo di contenuto.

Ho riordinato i miei articoli, ma l’ordine non è cambiato nel frontend del mio sito!

Questo plugin non cambia alcun comportamento nel frontend: cambia soltanto l’ordine del menu archiviato in WordPress.

Se desideri un elenco di pagine o tipi di contenuto personalizzato da visualizzare in quel preciso ordine, devi cambiare il parametro orderby della query dei post in menu_order (se non lo è già).

Ho riordinato il mio contenuto e sembrava funzionare, ma quando ho aggiornato è tornato al vecchio ordine!

Ciò probabilmente significa che la richiesta AJAX – il codice eseguito sul server – non è andata a buon fine dopo che hai rilasciato il contenuto nella nuova posizione. Alcuni host condivisi fanno scadere e limitano in modo aggressivo le richieste AJAX. La versione 2.0 raggruppa queste richieste: in tal modo puoi provare a ridurre il numero di elementi da aggiornare ad ogni richiesta utilizzando un filtro nel functions.php del tuo tema o in un plugin personalizzato:

add_filter( 'simple_page_ordering_limit', function($number) { return 5; } );

Dove 5 è il numero di elementi da raggruppare per ogni richiesta (l’opzione predefinita è 50). Nota che questo esempio usa le funzioni di callback di PHP5.3+, quindi se usi ancora PHP 5.2, dovrai utilizzare un callback tradizionale.

Cosa è successo al box a discesa che mi permetteva di cambiare il numero di elementi su ogni pagina nell’area di amministrazione??

Questa funzionalità è già disponibile in WordPress in modo nativo, ma è un po’ nascosta. Se tiri giù la scheda “Impostazioni schermata” posta in alto (nell’elenco degli articoli), c’è un campo dove puoi indicare il numero di elementi da mostrare per pagina. Ho pensato che non fosse giusto farne un duplicato.

How can I modify sortable post types?

Post types can be included or excluded by using the simple_page_ordering_is_sortable filter.

For example, to exclude the excluded_post_type custom post type, add the following snippet in the theme function file or custom plugin:

add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) {
    if ( 'excluded_post_type' === $post_type ) {
        return false;
    }
    return $sortable;
}, 10, 2 );

To include the include_post_type custom post type, add the following snippet in the theme function file or custom plugin:

add_filter( 'simple_page_ordering_is_sortable', function( $sortable, $post_type ) {
    if ( 'include_post_type' === $post_type ) {
        return true;
    }
    return $sortable;
}, 10, 2 );

Can I use REST to order posts?

Yes. The plugin registers the REST endpoint simple-page-ordering/v1/page_ordering.

Recensioni

15 Agosto 2024 3 risposte
Hi,if I use Admin Columns Pro plugin, than Simple Page Ordering for custom post don´t work, I can´t drag and drop. If I disbale Admin Columns Pro plugin, than I can drag and drop correctly. Drag and drop stop working after upgrade Admin Columns plugin to to 6.4.10. Before upgrade Simple Page Ordering works ok. I use Simple Page Ordering for custom post type created by ACF. Here is link for free version Admin Columns plugin:
20 Giugno 2024 2 risposte
Cool plugin in itself. Now if only the page attributes would be updated when reordering…..oh wait! I see that they do! Incredible, so you can output them with a query as intended and give the customer a better experience again. Thank you very much. I registered only for this review. Thank you !
13 Dicembre 2023 1 risposta
We’d struggled for a while implementing custom sort functionality for a long complex list for a client selling cameras … until we found this plugin. All the issues we were having with a competitor’s premium plugin were solved by switching to this plugin. The main thing was that we were able to manually sort on a custom post type whilst using custom filters. Works like a dream.
3 Settembre 2023 1 risposta
This makes life so much easier – just drag pages and put them in the order yo want them. So much easier than editing and trying to remember what number comes next. Thanks so much for this.
Leggi tutte le recensioni di 132

Contributi e sviluppo

“Simple Page Ordering” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

“Simple Page Ordering” è stato tradotto in 32 lingue. Grazie ai traduttori per i loro contributi.

Traduci “Simple Page Ordering” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il codice segui il repository SVN, segui il log delle modifiche tramite RSS.

Changelog

2.7.2 – 2024-08-21

2.7.1 – 2024-06-03

2.7.0 – 2024-04-03

2.6.3 – 2023-11-09

2.6.2 – 2023-11-09

  • Changed: Update the wp-compat-validation-tool composer package to version 0.3.1 which properly removes the .git directory (props @Sidsector9, @dkotter via #180).

2.6.1 – 2023-11-08

2.6.0 – 2023-10-25

2.5.1 – 2023-05-16

2.5.0 – 2023-04-18

Note that this release bumps the minimum required versions of PHP from 5.6 to 7.4 and WordPress from 3.8 to 5.7.

2.4.4 – 2023-01-10

View historical changelog details here.