How to reload a post page editor after published?

In no way I recommend to do that, as it will decrease the flexibility. However, if you have very rarest occasion and really need what you say, then put this code in functions.php: add_action( ‘save_post’, ‘newpost_redirect’, 99); function newpost_redirect() { if ( isset($_POST[‘original_publish’]) && “Publish”==$_POST[‘original_publish’]){ wp_redirect(admin_url(‘post-new.php’) , 302 ); exit; } }

WordPress post insertion from PHP file

The PHP way If you want to use PHP, you can use wp_insert_post to insert posts programatically. Basically you want to provide an array of post information (title, content, date…). You can read more about it here: https://developer.wordpress.org/reference/functions/wp_insert_post/ But the problem is you should not run that function to import all 100 posts. I used … Read more

How to display max. 2 sticky posts when posts_per_page is 3?

Edit 2: Updated Code to account for “Maybe there are no stickied posts” 😉 Edit: I did a boo-boo with the number of posts. Fixed, should work now as intended. You can do this by using two queries. <?php //First, you get all the sticky posts $stickies = get_option(‘sticky_posts’,array()); //then, get max 2 of them … Read more