• Resolved pageinsights

    (@pageinsights)


    Thanks for the nice plugin.

    I want you to help me with post time eligibility, like i have posts which are newer like 1-30 days old

    What i want to achieve is, setup auto republish with all old posted posts from archive, once eligible posts found not only from your Post Republish Eligibility Age

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter pageinsights

    (@pageinsights)

    Where to find file settings-fields.php?

    Thread Starter pageinsights

    (@pageinsights)

    Can you edit code below and tell me where change line in code to get results in my question topic

    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: https://prntscr.com/mfrge4
    After: https://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: https://prntscr.com/mfrfby. Then select resave changes.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Post Eligibility Time setup auto republish less than 30 days old posts’ is closed to new replies.