Hi @oct4v3
Go to wp-content\plugins\wp-auto-republish\admin\settings-fields.php on line 99 and add this line $items = apply_filters( 'wpar_republish_eligibility_age', $items );.
Before: http://prntscr.com/mfrge4
After: http://prntscr.com/mfrgzc
And then add this snippets to the end of your active theme’s functions.php file:
add_filter( 'wpar_republish_eligibility_age', 'wpar_add_custom_age' );
function wpar_add_custom_age( $items ) {
$item = array(
'1' => __( '1 Day', 'wp-auto-republish' ),
'2' => __( '2 Days', 'wp-auto-republish' ),
'3' => __( '3 Days', 'wp-auto-republish' )
);
return array_unique( array_merge( $item, $items ) );
}
This will add options like this: http://prntscr.com/mfrfby. Then select resave changes.
Thanks!
-
This reply was modified 7 years, 3 months ago by
Sayan Datta.
Thread Starter
oct4v3
(@oct4v3)
Hey, i have done as you said, Snippet 1 and Snippet 2
I have added Snippet 2 to functions.php file in current active theme, but unfortunately, i cannot see the dropdown option of 1,2,3 days yet in your plugin options.
Do i need to maybe add these options of day in your plugin for snippet 2 aswell?
How does it relate to add snippet to function.php file of active theme?
Thanks for quick reponse
Appreciated
Thread Starter
oct4v3
(@oct4v3)
On Settings-fields.php files
I just edited Line 87:
$items = array(
'1' => __( '1 Day', 'wp-auto-republish' ),
'2' => __( '2 Days', 'wp-auto-republish' ),
'3' => __( '3 Days', 'wp-auto-republish' ),
'30' => __( '30 Days (1 month)', 'wp-auto-republish' ),
'45' => __( '45 Days (1.5 months)', 'wp-auto-republish' ),
'60' => __( '60 Days (2 months)', 'wp-auto-republish' ),
'90' => __( '90 Days (3 months)', 'wp-auto-republish' ),
'120' => __( '120 Days (4 months)', 'wp-auto-republish' ),
'180' => __( '180 Days (6 months)', 'wp-auto-republish' ),
'240' => __( '240 Days (8 months)', 'wp-auto-republish' ),
'365' => __( '365 Days (1 year)', 'wp-auto-republish' ),
'730' => __( '730 Days (2 years)', 'wp-auto-republish' ),
'1095' => __( '1095 Days (3 years)', 'wp-auto-republish' )
);
Is this correct? I didnt add anything in functions.php file of current active theme, will this work?
Thanks
Thread Starter
oct4v3
(@oct4v3)
OK i saw and fixed as you mentioned, its showing there in dropdown all good.
But its not changing post publish dates which were published like 1-3 days ago
What setting do i need to use?
I want to publish each post which were published like 1 or 2 or 3 days ago
I have resaved the settings with 1 day ago, but it didnt republish
Please help with screenshot of settings
I want this setting to work:
http://prntscr.com/mft3bj
Minimum Republish Time is 6 hours
But it isnt working, not republishing post, is it maybe time setting? Or is cron is of an issue? All good on my hosting.
Thanks
-
This reply was modified 7 years, 3 months ago by
oct4v3.
Hi @oct4v3
I can suggest you this:
$items = array(
'1' => __( '1 Day', 'wp-auto-republish' ),
'2' => __( '2 Days', 'wp-auto-republish' ),
'3' => __( '3 Days', 'wp-auto-republish' ),
'30' => __( '30 Days (1 month)', 'wp-auto-republish' ),
'45' => __( '45 Days (1.5 months)', 'wp-auto-republish' ),
'60' => __( '60 Days (2 months)', 'wp-auto-republish' ),
'90' => __( '90 Days (3 months)', 'wp-auto-republish' ),
'120' => __( '120 Days (4 months)', 'wp-auto-republish' ),
'180' => __( '180 Days (6 months)', 'wp-auto-republish' ),
'240' => __( '240 Days (8 months)', 'wp-auto-republish' ),
'365' => __( '365 Days (1 year)', 'wp-auto-republish' ),
'730' => __( '730 Days (2 years)', 'wp-auto-republish' ),
'1095' => __( '1095 Days (3 years)', 'wp-auto-republish' )
);
But if you update this plugin then this customization will be gone.
I want to publish each post which were published like 1 or 2 or 3 days ago
I have resaved the settings with 1 day ago, but it didnt republish
Please check your settings twice as it is working perfectly on my end.
Thanks!
-
This reply was modified 7 years, 3 months ago by
Sayan Datta.