Title: Sticky CPT
Author: Kantari Samy
Published: <strong>23. Oktober 2016</strong>
Last modified: 30. September 2026

---

Plugins suchen

![](https://ps.w.org/sticky-cpt/assets/banner-772x250.png?rev=1520508)

![](https://s.w.org/plugins/geopattern-icon/sticky-cpt_ffffff.svg)

# Sticky CPT

 Von [Kantari Samy](https://profiles.wordpress.org/leprincenoir/)

[Herunterladen](https://downloads.wordpress.org/plugin/sticky-cpt.3.0.0.zip)

 * [Details](https://de.wordpress.org/plugins/sticky-cpt/#description)
 * [Rezensionen](https://de.wordpress.org/plugins/sticky-cpt/#reviews)
 *  [Installation](https://de.wordpress.org/plugins/sticky-cpt/#installation)
 * [Entwicklung](https://de.wordpress.org/plugins/sticky-cpt/#developers)

 [Support](https://wordpress.org/support/plugin/sticky-cpt/)

## Beschreibung

The plugin allows to highlight the CPT in the same way as would the WordPress core
functionality for posts.
 You can highlight new content created for your CPT. It
is also possible to highlight the content quickly thanks to quick edit and bulk 
actions.

The sticky checkbox is available in the block editor, in the classic editor, in 
quick edit and in bulk edit, for every public custom post type.
 Sticky items are
stored in the core `sticky_posts` option, exactly like sticky posts: `is_sticky()`
works out of the box.

Start example

    ```
    $args = array(
        'post_type'      => ['project'],
        'post_status'    => 'publish',
        'posts_per_page' => -1,
        'post__in'       => get_option( 'sticky_posts' )
    );
    $stickyProject = new WP_Query( $args );
    ```

Hook available

    ```
    add_filter( 'sticky_cpt_add_cpt' , 'add_cpt' );

    function add_cpt( $post_types ) {
        $post_types['newcpt'] = 'newcpt';
        return $post_types;
    }
    ```

## Screenshots

[⌊Highlighted in an article⌉⌊Highlighted in an article⌉[

Highlighted in an article

[⌊list items with Sticky⌉⌊list items with Sticky⌉[

list items with Sticky

## Installation

 1. Upload the plugin files to the `/wp-content/plugins/sticky-cpt` directory, or install
    the plugin through the WordPress plugins screen directly.
 2. Activate the plugin through the ‚Plugins‘ screen in WordPress

## FAQ

### Does my custom post type need the `custom-fields` support?

No. Since 3.0.0 the block editor uses the native `sticky` field of the REST API.
Your custom post type only needs `show_in_rest` to use the block editor.

### Who can stick a content?

Users who can both publish and edit others‘ contents of the custom post type, the
same rule WordPress applies to posts.

### I was reading the `sticky_value_cpt` post meta, what should I do?

This meta was removed in 3.0.0. Use `is_sticky( $post_id )` or `get_option( 'sticky_posts')`
instead.

### How are sticky contents synchronized between Polylang translations?

Enable „Sticky posts“ in the Polylang synchronization settings. Until 2.0.0 the 
sticky state was carried by a custom field, so it followed the „Custom fields“ synchronization.
Since 3.0.0 it only follows the „Sticky posts“ synchronization.

### Known issue with Polylang: a bulk edit unsticks translated contents

When the Polylang „Sticky posts“ synchronization is enabled, a bulk edit that leaves
the „Sticky“ field on „No Change“ unsticks the edited contents and their translations.
This comes from Polylang (observed with Polylang 3.8.10) and also affects regular
posts, with or without this plugin. Until it is fixed in Polylang, select „Sticky“
explicitly in the bulk edit form when all the selected contents are sticky, or stick
them again afterwards.

## Rezensionen

![](https://secure.gravatar.com/avatar/6f505c6be9a951929a99becb6b413dcfa583a5ca3dd0f7320766fee1481f0f82?
s=60&d=retro&r=g)

### 󠀁[Good job! (small feature request inside)](https://wordpress.org/support/topic/good-job-small-feature-request-inside/)󠁿

 [Jb Audras](https://profiles.wordpress.org/audrasjb/) 2. März 2017 1 Antwort

Great job dude, i love it ! 🙂 As a little feature request for the next version,
i guess you should prepare your plugin for GlotPress native i18n. See : https://
translate.wordpress.org/projects/wp-plugins/sticky-cpt , the plugin is not well 
prepared for internationalization. The load_plugin_textdomain() function is missing,
as well as the language textdomain metadata in the plugin main file comments, and
a better use of WP translation strings 😉 E.g : instead of __( "Make this post sticky"),
you should rather use __( "Make this post sticky", "sticky-cpt" ) But very nice 
work by the way, as usual 🙂

![](https://secure.gravatar.com/avatar/876a5ffeeebdea4c20261678a87c672960635cf376c4ace0a9dc70fe88f1dde3?
s=60&d=retro&r=g)

### 󠀁[4.7.2 works (with cpt ui)](https://wordpress.org/support/topic/4-7-2-works-with-cpt-ui/)󠁿

 [Chris](https://profiles.wordpress.org/eskim0/) 27. Februar 2017 1 Antwort

Thanks!

 [ Alle 2 Rezensionen lesen ](https://wordpress.org/support/plugin/sticky-cpt/reviews/)

## Mitwirkende und Entwickler

„Sticky CPT“ ist Open-Source-Software. Folgende Menschen haben an diesem Plugin 
mitgewirkt:

Mitwirkende

 *   [ Kantari Samy ](https://profiles.wordpress.org/leprincenoir/)
 *   [ Whodunit ](https://profiles.wordpress.org/whodunitagency/)

[Übersetze „Sticky CPT“ in deine Sprache.](https://translate.wordpress.org/projects/wp-plugins/sticky-cpt)

### Interessiert an der Entwicklung?

[Durchstöbere den Code](https://plugins.trac.wordpress.org/browser/sticky-cpt/),
sieh dir das [SVN-Repository](https://plugins.svn.wordpress.org/sticky-cpt/) an 
oder abonniere das [Entwicklungsprotokoll](https://plugins.trac.wordpress.org/log/sticky-cpt/)
per [RSS](https://plugins.trac.wordpress.org/log/sticky-cpt/?limit=100&mode=stop_on_copy&format=rss).

## Änderungsprotokoll

#### 3.0.0

 * Rewrite: the sticky state now relies on the native `sticky` REST field, the `
   custom-fields` support is no longer required for the block editor.
 * Breaking: the `sticky_value_cpt` post meta is removed and deleted on update. 
   Use `is_sticky()` or the `sticky_posts` option.
 * Breaking: with Polylang, the sticky state no longer follows the „Custom fields“
   synchronization. Enable the „Sticky posts“ synchronization instead.
 * Security: only users allowed to publish and edit others‘ contents of the post
   type can stick or unstick a content.
 * Fix: a sticky content is no longer unstuck when it is saved from the block editor
   with meta boxes, or from quick edit on hierarchical post types.
 * Fix: duplicated IDs in the `sticky_posts` option and wrong sticky counter.
 * Fix: stray text printed in the classic editor footer.
 * Performance: the sticky counter of the list screen no longer loads every ID of
   the post type.
 * Block editor script migrated to `wp.editor.PluginPostStatusInfo`.
 * Requires WordPress 6.6 and PHP 8.2. Tested with WordPress 7.1.

#### 2.0.0

 * 19 march 2020
 * Gutenberg compatibility

#### 1.0.1

 * 04 july 2017
 * Add contributor Whodunit and Check compatibility WordPress 4.8

#### 1.0.0

 * 22 oct 2016
 * Initial release \o/

## Meta

 *  Version **3.0.0**
 *  Zuletzt aktualisiert **vor 2 Wochen**
 *  Aktive Installationen **50+**
 *  WordPress-Version ** 6.6 oder höher **
 *  Getestet bis **7.1.3**
 *  PHP-Version ** 8.2 oder höher **
 *  Sprache
 * [English (US)](https://wordpress.org/plugins/sticky-cpt/)
 * Schlagwörter
 * [cpt](https://de.wordpress.org/plugins/tags/cpt/)[forward](https://de.wordpress.org/plugins/tags/forward/)
   [highlighting](https://de.wordpress.org/plugins/tags/highlighting/)[push](https://de.wordpress.org/plugins/tags/push/)
   [sticky](https://de.wordpress.org/plugins/tags/sticky/)
 *  [Erweiterte Ansicht](https://de.wordpress.org/plugins/sticky-cpt/advanced/)

## Bewertungen

 5 von 5 Sternen.

 *  [  2 5-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/sticky-cpt/reviews/?filter=5)
 *  [  0 4-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/sticky-cpt/reviews/?filter=4)
 *  [  0 3-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/sticky-cpt/reviews/?filter=3)
 *  [  0 2-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/sticky-cpt/reviews/?filter=2)
 *  [  0 1-Sterne-Rezensionen     ](https://wordpress.org/support/plugin/sticky-cpt/reviews/?filter=1)

[Deine Rezension](https://wordpress.org/support/plugin/sticky-cpt/reviews/#new-post)

[Alle Rezensionen anzeigen](https://wordpress.org/support/plugin/sticky-cpt/reviews/)

## Mitwirkende

 *   [ Kantari Samy ](https://profiles.wordpress.org/leprincenoir/)
 *   [ Whodunit ](https://profiles.wordpress.org/whodunitagency/)

## Support

Möchtest du etwas mitteilen? Brauchst du Unterstützung?

 [Support-Forum anzeigen](https://wordpress.org/support/plugin/sticky-cpt/)