WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. kaczy801
    Member
    Posted 6 months 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 6 months 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 6 months 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 5 months ago #

    Thanks you

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.