Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Get WPUF Pro to work with future/schedules posts WordPress

  • SOLVED

I have the Pro version of this...
https://en-au.wordpress.org/plugins/wp-user-frontend/

I want it to work with...
This https://en-au.wordpress.org/plugins/no-future-posts/ and
future/scheduled posts, and
this...
add_action( 'pre_get_posts', function ( $q )
{
if ( !is_admin()
&& $q->is_main_query()
&& $q->is_single()
) {
$q->set( 'post_status', ['publish', 'future'] );
}
});


So that it shows and edits future posts with the post date as per what is set in the front-end post submission form.

Answers (1)

2018-02-13

Arnav Joy answers:

can you please explain little more about your requirement ?


pjeaje comments:

what needs explaining?


Arnav Joy comments:

I am not clear about your requirement .
but please try this code

add_action( 'pre_get_posts', 'aj_pre_get_posts' );

function aj_pre_get_posts ( $q ) {
if ( !is_admin() && $q->is_main_query() && $q->is_single() ) {
$q->set( 'post_status', array('publish', 'future') );
}
}


pjeaje comments:

The plugin doesn't acknowledge the date I set as the publish/scheduled date. The other option is to set the post date via a custom field (when i submit a post wit the front end form) and have a function that uses the custom field value as the post date.


Arnav Joy comments:

Is it possible you can show me your site?