WordPress.org

Ready to get started?Download WordPress

Forums

Delightful Downloads
[resolved] Invalid download. (4 posts)

  1. kaczy801
    Member
    Posted 1 year ago #

    how to do a redirect from the Invalid download. to homepage
    Unfortunately plugin "Redirection" does not work

    http://wpthemess.net/?ddownload=5867

    https://wordpress.org/plugins/delightful-downloads/

  2. A5hleyRich
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    This is currently not possible, however I have a bug fix to push out the weekend so I'll add a hook in the update which will allow you to add a redirect.

    Ashley

  3. A5hleyRich
    Member
    Plugin Author

    Posted 1 year ago #

    The hook has been added in the latest version.

    You can now redirect using the following code snippet, which you will need to add to your theme's functions.php file.

    function custom_ddownload_invalid_download() {
    
    	$location = 'http://domain.com/custom-location/';
    
    	wp_redirect( $location );
    	exit();
    
    }
    add_action( 'ddownload_download_invalid', 'custom_ddownload_invalid_download' );

    Just change the location and your good to go.

    Ashley

  4. kaczy801
    Member
    Posted 11 months ago #

    Thanks you

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.