You can use a simple script which you run once and remove. The idea is to replace the sticky post array with an array of the 4 desired ID’s
PHP 5.4+ version – short array syntax
add_action( 'init', function ()
{
// Define our new array
$stickies = [1,2,3,4]; // Change to match your own ID's
// Update the sticky posts option
update_option(
'sticky_posts', // Option name
$stickies // New value
);
}, PHP_INT_MAX );
Pre PHP5.4 version
add_action( 'init', function ()
{
// Define our new array
$stickies = array( 1,2,3,4 ); // Change to match your own ID's
// Update the sticky posts option
update_option(
'sticky_posts', // Option name
$stickies // New value
);
}, PHP_INT_MAX );
Related Posts:
- Exclude sticky post from main query?
- Show Sticky Posts in Category Archive
- Set sticky posts schedule (Automatic)
- Add a single featured post to all pages?
- Display only the most recent sticky post, display other posts in chronological order
- Include sticky posts in ‘Blog pages show at most’ X number of posts?
- Exclude expired sticky posts
- Exclude Sticky posts from Main Query break Pagination
- ignore_sticky_posts in WordPress 3.0.3?
- Exclude Current and Sticky Post
- Front page should display only one category of posts including sticky post with custom featured post box
- Make sticky post on save
- Pin a post to the top of a page, other than the home page
- Why WordPress CMS uses an array in wp_options instead of a field for Sticky posts?
- ignore_sticky_posts not working with word press version 3.9.1
- How to modify query on category pages to show only sticky posts?
- How to check a post is sticky or not yet?
- Custom query: how to get the sticky posts first?
- I would like to change the sticky posts label “Featured” to something else
- How to display sticky post with custom html
- Update a post to remove sticky option
- Show image if a post is featured
- I do not want my front page sticky post to show up in a category
- How to display a sticky post inside a div?
- WooThemes Mini Features – modify query_posts to display only sticky_posts
- Exclude Sticky Posts as everyone!
- Don’t move sticky posts to the first page
- Latest Sticky Posts with Grid Thumbnails for static front page
- Remove old sticky post on publish
- Limit Number of Sticky Posts to Show
- get_option(‘sticky_posts’) returns stickies that are in trash
- Display latest sticky post or display nothing
- Create thumbs only when a post is sticky or any other way?
- How can I display only sticky posts from a parent category on the homepage?
- Images for sticky posts
- Sticky Posts exceed posts per page limit
- why ignore_sticky_posts in sticky post query
- How to add “Stick this post to the front page” to front end?
- Code to make a post sticky
- Sticky Posts & Posts Per Page [closed]
- Using categories & “stickyness” together
- Disable sticky posts feature
- Apply styling only to first page sticky posts
- Adding Sticky functionality to Custom Post Type Archives
- Schedule Sticky Posts
- How to make all posts in a category sticky?
- Display All Sticky Post Before Regular Post
- All sticky posts are returned in custom query
- how to make custom posts sticky? [duplicate]
- How to make all posts in a category “unsticky”?
- “Sticky” posts for each category (archive.php)
- Sticky Post default functionality with WP_Query is ignored when using AJAX
- Display all custom post type posts and order them by an optional meta_key
- Excluding Sticky Posts from The Loop and from WP_Query() in WordPress?
- Change sticky status of posts from phpMyAdmin
- How to get 1 or 2 specific posts on top of my wordpress blog?
- save_post_{CPT} not updating the ‘sticky_posts’ option
- Stick multiple posts in a single category
- Variable if post is sticky in functions.php
- Show Sticky Post at the top but do not show again in the loop?
- 3 Posts in Loop, Show Stickies First
- Sticky post appears twice
- How can I make a custom post type sticky?
- Keep sticky posts out of query unless they have featured image
- sticky post in custom loop
- Blog page Server error 500 with stick post loop in query.php
- WP Query to have sticky posts first, with pagination and having a joint ‘posts per page’ arg with main loop
- How can I allow sticky posts but cap the query to 1 post?
- Exclude all sticky posts front page twenty twelve
- Exclude first post (sticky or not) from the loop using query_posts()
- Loop for sticky posts
- Check if parent post is sticky on attachment page?
- How can I override the post title when a post is set to sticky? [closed]
- Where is the sticky post option?
- Display image for first sticky post only
- Sticky Post from page 2 and on
- Issue with first top post display order
- Make posts_per_page value the same on all pages
- Category sticky latest
- wordpress query_posts featured page always on top
- How do you get sticky posts to work with categories?
- Pin posts to top of custom loop
- Sticky Post Doesn’t always work
- How to pull sticky post permalink inside php?
- Custom Query with Sticky Posts
- Function for Sticky Post on Categories causes issues with 404 behavior
- Make sticky post with FacetWP
- why ignore_sticky_posts in sticky post query
- Pull posts from all categories if quantity is not met?
- WP_Query causing links to not work
- Sticky post of current viewing author?
- Trying to Exclude Sticky Posts From date_query
- Blog Displays Only Sticky Posts
- Set custom field value when reaching expiration date
- Insert/sticky multiple posts in multiple positions
- Jquery and Sticky
- Exclude sticky posts from query
- How to display only sticky posts on my automatically generated front page?
- First post outside of loop, homepage only?
- I make sticky post for my archive page for custom post type with ACF field and loop is not working