Support

Account

Home Forums Backend Issues (wp-admin) Backend is Broken!

Solved

Backend is Broken!

  • Hi,

    I tried including ACF in a plugin using this :

    // 1. customize ACF path
    add_filter('acf/settings/path', 'my_acf_settings_path');
     
    function my_acf_settings_path( $path ) {
     
        // update path
        $path = plugin_dir_path( __FILE__ ) . '/acf/';
        
        // return
        return $path;
        
    }
    
    // 2. customize ACF dir
    add_filter('acf/settings/dir', 'my_acf_settings_dir');
     
    function my_acf_settings_dir( $dir ) {
     
        // update path
        $dir = plugin_dir_path( __FILE__ ) . '/acf/';
        
        // return
        return $dir;
        
    }
     
    
    // 3. Hide ACF field group menu item
    //add_filter('acf/settings/show_admin', '__return_false');
    
    // 4. Include ACF
    include_once( plugin_dir_path( __FILE__ ) . '/acf/acf.php' );

    When i try to add new field, it’s just broken, please take a look

    http://imgur.com/jUIoE0p

  • Hi @meonex

    For the acf/settings/dir, could you please try plugin_dir_url function?

    Hope this helps.

  • Hi,

    Yes i figured it out, Thanks 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.