WordPress.org

Ready to get started?Download WordPress

Forums

WP Project Manager
[resolved] Change layout/content of direct file page? (2 posts)

  1. Amber
    Member
    Posted 1 year ago #

    Is there a way to hook in and change the page that displays when a user try's to directly access a file with a url? Currently it's just blank with a "0".

    I'd like to be able to create my own Error page with an actual error message.

    Thanks!

    http://wordpress.org/extend/plugins/wedevs-project-manager/

  2. Tareq Hasan
    Member
    Plugin Author

    Posted 1 year ago #

    Yes, that can be done. This snippet can be used for this:

    function cpm_serve_file_denied() {
        echo 'file not found';
        exit;
    }
    
    add_action( 'wp_ajax_nopriv_cpm_file_get', 'cpm_serve_file_denied' );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.