• I Would like to add a custom filter to relocate folders on my website but the code is so deep that I am unable to edit the code anymore but instead place an Add_Filter Array.

    This is what it currently looks like.

    $upload_dir = wp_upload_dir();
    $selected_dir = get_post_meta($post->ID, 'images_download_directory', true);
    $folders = scandir($upload_dir['basedir'].'/uploads');

    However, the downloads folders are on the root of the server so I tried to add add_filter but does nothing.

    add_filter('images_download_directory', 'add_custom_folders');
    function add_custom_folders($folders) {
    $folders[] = '../../../path/to/folder';
    return $folders;
    }

    Please help?

  • The topic ‘Add_Filter Arrays Help? Please?’ is closed to new replies.