https://github.com/wpup/cleanify
Remove slug from custom post types permalinks
https://github.com/wpup/cleanify
Last synced: 12 months ago
JSON representation
Remove slug from custom post types permalinks
- Host: GitHub
- URL: https://github.com/wpup/cleanify
- Owner: wpup
- License: mit
- Created: 2015-04-10T12:05:19.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2019-12-02T14:23:30.000Z (over 6 years ago)
- Last Synced: 2025-01-01T06:15:45.160Z (over 1 year ago)
- Language: PHP
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cleanify
[](http://unmaintained.tech/)
> Requires PHP 5.4
Simple WordPress plugin to remove slug from custom post types permalinks.
# Install
```
composer require frozzare/cleanify
```
# Example
Before: `http://example.com/photograph/random-name`
After: `http://example.com/random-name`
```php
add_filter( 'cleanify/cpts', function () {
return 'photograph';
} );
```
# Filters
#### cleanify/cpts
Return all post types where the slug should be removed.
Should be a string or array of strings.
## License
MIT © [Fredrik Forsmo](https://github.com/frozzare)