An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

README

          

# Cleanify

[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](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)