Custom Post Type Sticky

By Abhay Yadav

★ 4.8/5 (4 ratings)800+ active installationsVersion 2.0.0

Adds native-style sticky post management to public custom post types, including the WordPress Block Editor.

Description

Custom Post Type Sticky extends sticky post management to selected public custom post types. It keeps sticky post IDs synchronized with WordPress’s native sticky_posts option, so existing integrations that read that option can continue to work.

Features

  • Manage sticky posts for public custom post types.
  • Native Block Editor (Gutenberg) sidebar panel.
  • Classic Editor meta box.
  • Quick Edit support.
  • Bulk make-sticky and remove-sticky actions.
  • Sticky status column in the admin list.
  • Select supported post types under Settings > Custom Post Type Sticky.
  • Optional sticky expiration date.
  • Sticky priority field.
  • Sticky custom post type archive ordering, with sticky posts first.
  • Shortcode: [cpt_sticky_posts post_type="portfolio" posts_per_page="5"].
  • Sticky IDs remain available through get_option( 'sticky_posts' ).
  • Registered post meta is available to authenticated REST API post updates.

Installation

  1. Upload the custom-post-type-sticky folder to /wp-content/plugins/.
  2. Activate the plugin through the Plugins screen.
  3. Open Settings > Custom Post Type Sticky and select the public custom post types you want to manage.
  4. Edit a post in one of the selected post types and enable Make this post sticky in the editor sidebar or Classic Editor meta box.

FAQ

Does it work with custom post types?

Yes. Select public custom post types in Settings > Custom Post Type Sticky.

Does it support the Block Editor?

Yes. Version 2.0.0 adds a Sticky Post panel to the Block Editor document settings sidebar.

Does it work with the Classic Editor?

Yes. A Sticky Post meta box is available in the Classic Editor.

How do I display sticky posts?

Use the shortcode [cpt_sticky_posts post_type="portfolio" posts_per_page="5"], replacing portfolio with an enabled custom post type.

Where are sticky post IDs stored?

Sticky IDs are synchronized with WordPress’s native sticky_posts option.

Screenshots

Changelog

2.0.0

  • Added Block Editor sidebar integration.
  • Added Classic Editor meta box.
  • Added working Quick Edit and bulk sticky actions.
  • Added sticky status column and admin Sticky view.
  • Added settings to choose enabled public custom post types.
  • Added optional sticky expiration and priority metadata.
  • Added sticky-first ordering on enabled custom post type archives.
  • Added sticky posts shortcode.
  • Added REST API-visible post meta and synchronization with the native sticky_posts option.
  • Migrated existing sticky custom post type IDs without removing them.

1.2

  • Previous release.