Linux 软件免费装
Banner图

Presswell Site Structure

开发者 presswell
benplum
更新时间 2026年12月4日 02:12
PHP版本: 8.2 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

menu featured posts reorder page tree breadcrumbs

下载

1.0.0

详情介绍:

Presswell Site Structure keeps a site's structure in one place. It replaces the Pages list with a tree you can reorder by dragging, keeps one navigation menu in sync with it, lets a page act as the home of a custom post type, and adds the ordering, breadcrumbs, and featured posts that sites usually need several plugins for. Page tree Navigation menu Post type root pages Assign "About › Team" as the root of a person post type: people's URLs follow the page (/about/team/jane-doe/), the archive is served at the page's URL with its content, and the page is highlighted in menus. Posts can start their URLs with the posts page's path. Ordering terms and posts within terms Drag categories, tags, and custom taxonomies into order, with nesting. Each term can also have its own order of posts, for its archive and for single-term queries. Breadcrumbs A Breadcrumbs block, a template function, and a shortcode, with trails that follow the tree and use menu labels. Root pages also appear in Yoast SEO, The SEO Framework, Rank Math, and All in One SEO breadcrumbs. Structure blocks For block themes: a Root Page block heads an archive with its root page's title and content; a Page Tree block shows the current section, a page's children, or a site map, with the current page marked; and a Previous / Next Page block links through pages in tree order. Featured posts Star posts in lists and trees (one at a time or in bulk) or in the editor, arrange them on a Featured screen, and set a limit per post type. Show them with the Featured Posts block or 'pwss_featured' => true in a query. Query Loops A Site Structure panel on every Query Loop: use the tree order, a term's post order, or only (or no) featured posts, with matching editor previews. Moving from other plugins Importers for Nested Pages, Reorder by Term, Breadcrumb NavXT, NS Featured Posts, and the common post and term ordering plugins. Each starts with a dry run and leaves the other plugin's data in place. Only the optional Nested Pages cleanup, a separate step, deletes it (see the FAQ). Settings and debugging Settings › Site Structure has a tab per area. Breadcrumbs and Featured Posts can be turned off entirely. A Debug tab shows status, runs integrity checks with safe fixes, and keeps a private log that turns itself off after 7 days. Developers Themes get template functions (pwss_get_tree(), pwss_breadcrumbs(), pwss_get_featured_posts(), and root page helpers), query arguments ('pwss_featured' => true, 'orderby' => 'pwss_term_order', 'orderby' => 'pwss_order' for terms), REST fields, and WP-CLI commands for every importer. Markup, permissions, and where each order applies can be changed with filters, and actions fire on moves, menu syncs, and featured changes. The full developer reference is part of the plugin's documentation on presswell.co.

安装:

  1. Install and activate the plugin.
  2. Open Settings › Site Structure and choose the post types that get a tree (Post Types tab) and the menu to keep in sync (Menu tab).
  3. Moving from another plugin? Use its importer on the Tools tab, starting with a dry run.

常见问题:

How do I move from Nested Pages?

Deactivate Nested Pages, then use Settings › Site Structure › Tools (or wp pwss import). A dry run shows the menu before and after, side by side, and any post type URLs that change. The import brings over tree and menu settings, root page assignments, page menu settings (labels, hidden items, classes, targets, custom URLs), links, and the synced menu, keeping its items. Undo restores the menu and settings until you run the cleanup step, which deletes what Nested Pages left behind.

How do I move from Reorder by Term, Breadcrumb NavXT, or NS Featured Posts?

Each has an importer on Settings › Site Structure › Tools (and a WP-CLI command), starting with a dry run. None of them change the other plugin's data.

  • Reorder by Term (wp pwss import-reorder-by-term) copies each term's post order. Its data is left in place until your theme's queries are switched over.
  • Breadcrumb NavXT (wp pwss import-navxt) copies its settings and custom post type root pages, and lists the theme files, content, and widgets that still use NavXT.
  • NS Featured Posts (wp pwss import-featured) copies its post types, limits (radio mode becomes a limit of 1), and featured posts, and lists theme queries and widgets that still use it.

What about other ordering plugins?

  • Intuitive Custom Post Order, Simple Custom Post Order, Post Types Order, Category Order and Taxonomy Terms Order, and Reorder Posts (Metronet): Settings › Site Structure › Tools (or wp pwss import-ordering) turns on trees for the post types they ordered and copies their term order. Post order is already stored where the tree reads it. Deactivate them afterwards, because they re-sort queries too.
  • Simple Page Ordering and CMS Tree Page View store nothing of their own: deactivate them, and turn on "Use order on site" for any flat post type whose order you want on the front end.

How do post type root pages work?

Assign a page as the root of a post type under Settings › Site Structure › Post Types. For example, assign "About › Team" to a person post type:

  • Person URLs follow the page's path: /about/team/jane-doe/.
  • The post type archive is served at the page's URL, so templates can render the page's content above the listing.
  • The page is highlighted in menus while viewing the archive or a single person.
  • Child pages of the root page keep working; pages win over post type URLs.
  • Moving or renaming the page updates the URLs, and rewrite rules are flushed once.
For posts, the posts page (Settings › Reading) is the root. Turn on "Use page path" on its row to start post URLs with the posts page's path: /blog/hello-world/. Only posts change; category, tag, and date archives and other post types keep their URLs, and old post URLs redirect to the new ones.

How does term ordering apply on the site?

  • Turn on "Reorder" for categories, tags, or custom taxonomies under Settings › Site Structure › Taxonomies.
  • With "Replace list table" on (the default), the term screen shows the tree beside core's Add form: drag to reorder or nest, quick edit name, slug, and description, delete one or many, and see each term's item count. Terms added with the form appear in the tree right away. "List view" shows core's table; turn the setting off to keep the table and use a separate "Reorder" screen instead.
  • Drag, keyboard, and "Move to…" moves work as in the page tree; hierarchical taxonomies can be nested. Links other plugins add to the term list's rows appear in the tree's actions menu.
  • Turn on "Use order on site" to apply the order to get_terms() calls that use the default name order. Any call can ask for it with 'orderby' => 'pwss_order'. A call that explicitly asks for 'orderby' => 'name' can't be told apart from the default, so use 'slug' or the pwss_apply_term_order filter to opt out.
  • New terms are added at the end of their siblings.

How do I order posts within a term?

  • Turn on "Order posts in terms" for a taxonomy, and each term gets an "Order posts" action: drag that term's posts into the order you want. Each term keeps its own order, separate from the posts' order anywhere else.
  • Posts you haven't placed follow the placed ones, newest first, so new posts never disappear from a list and no "build" step is needed.
  • Turn on "Use post order on site" to apply it to the term's archive and any query for that single term that doesn't choose its own order. Any single-term query can ask for it with 'orderby' => 'pwss_term_order'; get_posts() always passes an order, so use that argument there.

What does the menu sync do?

  • Choose one menu (or create one) under Settings › Site Structure › Menu, and it follows the tree: order, nesting, labels, and hidden items.
  • Add links to the tree: custom URLs, posts of other types, terms, and archives. Links are real menu items, so themes and menu plugins work with them as usual.
  • Hide pages or links in the menu, set a menu label, title attribute, CSS classes, a new-tab target, or a custom URL from quick edit, or from the "Navigation" panel in the block editor's sidebar.
  • The menu can be locked so it's only edited from the tree; Appearance › Menus, the Customizer, and the REST API refuse changes to it. Other menus stay editable, and theme locations can still be assigned.
  • Sync is one-way and only writes what changed. Menu items keep their IDs, so data other plugins store on them survives.
  • Block themes: turn on "Also keep a Navigation block menu in sync" and select that menu in your theme's Navigation block. It follows the same tree and is locked the same way.
  • Taking over an existing menu keeps its items: pages stay where they are, other items become links, and pages that weren't in the menu are marked hidden.

How do I add breadcrumbs?

Add the Breadcrumbs block to a template, print a trail in a classic theme with <?php pwss_breadcrumbs(); ?>, or use the [pwss_breadcrumbs] shortcode. Trails follow the page tree (and so the synced menu), use menu labels, and put posts under their root page: Home › About › Team › Jane Doe. Posts can include their category (and its parents): Home › Blog › News › Local › Hello. Output is an accessible <nav><ol> list with optional schema.org JSON-LD. Settings › Site Structure › Breadcrumbs sets the defaults: the home link and label, the separator, which taxonomy's term each post type shows and whether its parents show, and whether term archives show parent terms. Markup is changed with filters (see the developer reference). Root pages also appear in Yoast SEO, The SEO Framework, Rank Math, and All in One SEO breadcrumbs, and a post type archive served at its root page uses the page's SEO title and description (Yoast, The SEO Framework, Rank Math).

How do featured posts work?

Turn on Featured Posts under Settings › Site Structure › Settings, then choose the post types on the Featured tab, each with an optional limit. Star posts in the list, from a tree row's actions, or with the "Featured" checkbox in the editor, and drag them into order on the Featured screen (Posts › Featured). With a limit of 1, featuring a post replaces the featured one. Show them with the Featured Posts block, a Query Loop that lists featured posts in their order. Any Query Loop can also leave the featured posts out ("latest posts, without the featured ones"). In PHP, use pwss_get_featured_posts() or 'pwss_featured' => true in a query.

Can a feature be turned off?

Settings › Site Structure has a tab for each area: Settings, Post Types, Taxonomies, Menu, Breadcrumbs, Featured, Tools, and Debug. The Settings tab turns features on and off (Breadcrumbs and Featured Posts; a feature that's off has no tab, block, or screens), turns on a private debug log (it turns itself off after 7 days) and sets whether the plugin's data is removed when it's deleted. The Tools tab has the importers (also listed under Tools › Import), tools to sync the menu, update root paths, clear tree caches, and reset expanded rows, and settings export and import as JSON. The Debug tab shows the plugin's status (trees and their load time, the managed menu and its last sync, root paths, overlapping plugins), runs integrity checks with fixes where they're safe (missing or looping parents, ambiguous order, stray or duplicate menu items, stale root paths), and shows the debug log.

更新日志:

1.0.0