• Resolved almerion

    (@almerion)


    Hello, i wanted to change the default settings for new pretty links, precisely i wanted to enable the forwarding by default so i don’t have to always enable it manually, i tried to find a way but couldn’t figure out how to do it

    Thanks for your help

Viewing 4 replies - 1 through 4 (of 4 total)
  • Tyler

    (@tylerthedude)

    Hi there,

    Thank you for reaching out. You can have the “Parameter Forwarding” option enabled by default for all newly created pretty links by adding this code snippet either to your theme’s functions.php file or using a plugin such as Code Snippets:

    add_action( 'admin_footer', function() {
    
    $screen = get_current_screen();
    
    if ( 'pretty-link' == $screen->id ) {
    
    ?>
    
    <script type="text/javascript">
    
    jQuery( document ).ready( function() {
    
    jQuery( '#param_forwarding' ).prop( "checked", true );
    
    } );
    
    </script>
    
    <?php
    
    }
    
    } );

    Kind regards,

    Thread Starter almerion

    (@almerion)

    Thanks for your response, so there is no pretty links custom hook to change default parameters ?

    Tyler

    (@tylerthedude)

    Hi there,

    Thank you for getting back to me, and please forgive the delayed response. There’s not currently a custom hook to change the Parameter Forwarding default option, but the script provided in my last response will ensure that the option is selected by default each time a new pretty link is created on the site.

    Kind regards,

    Hi Tyler,

    Is there a way to enable the Parameter Forwarding on all my pretty links (altready built) in one time? Maybe in the database?

    Thanks for your help

    Best

    Jean-Christophe

    • This reply was modified 1 year, 4 months ago by sunsetbld.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘changing default settings for new pretty links’ is closed to new replies.