Sticky CPT

March 19, 2020

Sticky CPT Plugin

Add the possibility of "sticky" CPT. (Gutenberg compatibility)

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 bulk actions.

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; } 

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

Screenshots

  1. Highlighted in an article

    Highlighted in an article

  2. list items with Sticky

    list items with Sticky

FAQ

(soon)

Changelog

1.0.1

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

1.0.0

  • 22 oct 2016
  • Initial release \o/

Details

  • Version: 2.0.0
  • Active installations: 60
  • WordPress Version: 3.5
  • Tested up to: 5.3.18

Ratings


5 Stars
4 Stars
3 Stars
2 Stars
1 Stars