WP Manifestindependent plugin directory
manifest / developer / gwp-page-slug-exporter

GWP Page URL Exporter

This plugin was built mainly for theme development purposes and for my personal workflow needs. 😑

by GRT Woo Press · github.com/ridhwanahsan/gwp-page-slug-exporter

★ 0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/ridhwanahsan/gwp-page-slug-exporter/archive/refs/heads/main.zip

Export WordPress URLs as clean PHP snippets using esc_url( home_url() ). Simple, fast, and developer-friendly — with search, pagination, copy actions, and TXT exports. Works for pages, posts, and public custom post types; optionally include parent slugs in the path.

image

Features

  • Admin page: Dashboard → GWP Page Exporter
  • List items with Search + Pagination
  • Auto-generate snippet per item
  • Copy Snippet, Copy Slug, Copy Selected, Copy All
  • Export Selected (TXT), Export All (TXT)
  • Post Type dropdown (Page, Post, CPTs)
  • Settings:
    • Include Home URL snippet
    • Items per page
    • Include Parent Slug in URL (full path vs slug-only)
  • Scoped CSS (gwp-*) and assets loaded only on plugin page

Example

<?php echo esc_url( home_url( '/about-us' ) ); ?>

If “Include Parent Slug in URL” is ON and your site uses a parent page or subdirectory:

<?php echo esc_url( home_url( '/infitech/about-us-one' ) ); ?>

Installation

  • Upload folder to wp-content/plugins
  • Activate “GWP Page URL Exporter”
  • Open Dashboard → GWP Page Exporter
  • Configure Settings under GWP Page Exporter → Settings

Usage

  1. Open the exporter page
  2. Choose Post Type (Page, Post, CPT)
  3. Search and paginate through items
  4. Use per-row Copy to grab a single snippet; use Copy Slug to grab the slug
  5. Select rows and use Copy Selected or Export Selected (TXT)
  6. Use Export All (TXT) or Copy All for the full list
  7. Adjust settings:
    • Include Home URL: prepend <?php echo esc_url( home_url( '/' ) ); ?>
    • Items per page: control pagination size
    • Include Parent Slug in URL: toggle full hierarchical path vs slug-only

Settings

  • Include Home URL snippet: adds root URL snippet at top of preview and exports
  • Items per page: pagination size in listing
  • Include Parent Slug in URL:
    • ON: use full path derived from get_permalink()
    • OFF: use only post_name with a leading slash

Security

  • Admin-only (manage_options)
  • Nonce verification for export actions
  • Sanitization of inputs (search, paged, post_type, selected IDs)
  • Escaping for all outputs (HTML/UI and snippet strings)

Performance

  • Assets enqueued only on exporter admin page
  • Efficient queries via WP_Query with pagination and search

Compatibility

  • No theme CSS overrides (scoped CSS)
  • Works with any theme following WordPress standards

File Structure

  • gwp-page-url-exporter.php — bootstrap and hooks
  • includes/admin/class-gwp-admin.php — admin page, listing, exports
  • includes/admin/class-gwp-settings.php — settings registration and UI
  • assets/css/admin.css — scoped admin styles
  • assets/js/admin.js — copy/selection interactions

Changelog

1.0.0

  • Initial release: exporter, search, pagination, copy actions, TXT export, post type selector, settings (home URL, per-page, parent slugs).

License

GPLv2 or later