Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Support Chrystl

    (@chrystl)

    Hi
    Could you please provide some screenshots of your admin side to illustrate your request?
    You can upload them via https://snag.gy and link to them here. Please don’t cut the admin top bar and the left menu on your screenshots.

    EDIT: Which version of ACF are you using?

    Thread Starter amilani.guy

    (@amilaniguy)

    Hi,

    This is the screenshot – https://clip2net.com/s/3wqNL2f
    you can see it’s asking me to translate ACF,

    ACF PRO version: Version 5.3.1

    Plugin Support Chrystl

    (@chrystl)

    It should remove the language column with this small plugin below. I tested only with the free ACF 4.4.5 :

    <?php
    /**
    Plugin name: Unset Polylang for the ACF Fields Groups
    Author: author
    */
    
    add_filter('pll_get_post_types', 'unset_cpt_pll', 10, 2);
    function unset_cpt_pll( $post_types, $is_settings ) {
            unset($post_types['acf']);
    
        return $post_types;
    }

    To know more about the pll_get_post_types filter, see: https://polylang.wordpress.com/documentation/documentation-for-developers/filter-reference/

    Thread Starter amilani.guy

    (@amilaniguy)

    Hi Chrystl

    Thank you for your code, but It’s not working.

    I still have to translate my fields to all language.

    Guy

    Plugin Support Chrystl

    (@chrystl)

    You need certainly to adapt this code for ACF PRO.
    I can’t help more since I didn’t buy ACF PRO.

    Thread Starter amilani.guy

    (@amilaniguy)

    Can i send you some temporary login credentials to the site so you can help me ?

    Hi, I ve got same problem from last update. This should work, put this code into file functions.php in your theme folder:

    add_filter('pll_get_post_types', 'unset_cpt_pll', 10, 2);
    function unset_cpt_pll( $post_types, $is_settings ) {
            unset($post_types['acf-field-group']);
    
        return $post_types;
    }
    Thread Starter amilani.guy

    (@amilaniguy)

    Hi Wellard,

    Thank you,
    but when I Used your snippet I’ve got this error

    Fatal error: Cannot redeclare unset_cpt_pll() (previously declared in /var/www/vhosts/opus-preview.co.il/danpal.opus-preview.co.il/wp-content/plugins/remove-acf-lang-support/remove-acf-lang-support.php:8)

    Thread Starter amilani.guy

    (@amilaniguy)

    Sorry ??

    Forgot to deactivate former Plugin

    Thank you, now working Perfect

    if i add this code on the other language pages all ACF fields are missing.
    The flags have been deleted on the ACF Field Group Page, but the fields are missing on the pages itself. How can i activate the fields for ALL languages?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘ACF Polylang’ is closed to new replies.