Keresés

Hirdetés

Új hozzászólás Aktív témák

  • cigam

    félisten

    LOGOUT blog

    válasz nyesteb #8035 üzenetére

    Sajnos nem. Az első példakódot bemásoltam a functions.php-be,, hogy lássam mi merre hány méter. Látszólag nem történt semmi. Bekapcsoltam a "Stílusformázott kezelőfelület"et, hogy a kinézete olyan legyen mint a kategória beírásáé. Sajna a viselkedése még mindég nem olyan.
    function acf_load_szerkeszto_field_choices( $field ) {
        
        // reset choices
        $field['choices'] = array();
        // get the textarea value from options page without any formatting
        $choices = get_field('szerkeszto', 'option', false);
        // explode the value so that each line is a new array piece
        $choices = explode("\n", $choices);
        // remove any unwanted white space
        $choices = array_map('trim', $choices);
        // loop through array and add to field 'choices'
        if( is_array($choices) ) {
            foreach( $choices as $choice ) {
                $field['choices'][ $choice ] = $choice;
            }
        }
        // return the field
        return $field;
    }
    add_filter('acf/load_field/name=szerkeszto', 'acf_load_szerkeszto_field_choices');

    Freeware, és akciós programok egy helyen https://www.facebook.com/freewarenews

Új hozzászólás Aktív témák