Include future posts in tags and in search

To achieve the intended result you will have to modify the query by adding the future value to the post_status parameter via the pre_get_posts filter hook. add_action( ‘pre_get_posts’, ‘se338152_future_post_tag_and_search’ ); function se338152_future_post_tag_and_search( $query ) { // apply changes only for search and tag archive if ( ! ( $query->is_main_query() && (is_tag() || is_search()) ) ) … Read more

Publish scheduled pages right away in WordPress

I would do this with wp-cli. It’s a one line command: $ wp post update $(wp post list –post_status=draft –post_type=page –format=ids) –post_status=publish This command lists all pages that are draft (by id) and then updates all their statuses to “publish”. This is of course if these are actually pages. If it’s posts, you just need … Read more

Does WordPress provide an API for scheduling posts?

There isn’t really an API for it, because from usage perspective it is quite simple. If data passed to wp_insert_post() has publish or future value in post_status field and date in the future then it is inserted in database with that date and future in post_status. Effectively it is already considered scheduled. However something would … Read more

“Missed schedule” posting bug

You don’t really need a Plugin to define these type of cronjobs in a timely manner. All you need to do is to reliably call the WordPress Cron file which is wp-cron.php The question is if your Webhost allows you to start wget without any path command or if it’s allowed to start it anyway. … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)