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.zipExport 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.
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
- Open the exporter page
- Choose Post Type (Page, Post, CPT)
- Search and paginate through items
- Use per-row Copy to grab a single snippet; use Copy Slug to grab the slug
- Select rows and use Copy Selected or Export Selected (TXT)
- Use Export All (TXT) or Copy All for the full list
- 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
- Include Home URL: prepend
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_namewith a leading slash
- ON: use full path derived from
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_Querywith 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 hooksincludes/admin/class-gwp-admin.php— admin page, listing, exportsincludes/admin/class-gwp-settings.php— settings registration and UIassets/css/admin.css— scoped admin stylesassets/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