Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 136 through 150 (of 244 total)
  • Author
    Posts
  • in reply to: Link is an array #37956
    YasmineYasmine
    Participant

    Of course:

    
                   'name'       => __( 'Add Resources', 'your-text-domain' ),
                    'id'         => $prefix . 'resources_group',
                    'type'       => 'group',
                    'clone'      => true,
                    'sort_clone' => true,
                    'max_clone'  => 3,
                    'fields'     => [
                        [
                            'name' => __( 'Resource Name', 'your-text-domain' ),
                            'id'   => $prefix . 'name_of_resource',
                            'type' => 'text',
                        ],
                        [
                            'name'    => __( 'Resource Details', 'your-text-domain' ),
                            'id'      => $prefix . 'resource_details',
                            'type'    => 'textarea',
                            'tooltip' => [
                                'icon'     => '',
                                'position' => 'right',
                            ],
                        ],
                        [ 
    
                            'name'    => __( 'Resource Link', 'your-text-domain' ),
                            'id'      => $prefix . 'resource_link',
                            'type'    => 'url',
                            'tooltip' => [
                                'icon'     => '',
                                'position' => 'right',
            
                            ],
                        ],
    
    in reply to: Elementor group warning #37567
    YasmineYasmine
    Participant

    I still get the error, but the error did not cause the issue.

    in reply to: Making a user listing #37466
    YasmineYasmine
    Participant

    Ok, worked it out the code was missing a speech mark

    function libs_import() {
               wp_enqueue_style( 'datatable-style', 'https://cdn.jsdelivr.net/npm/[email protected]/media/css/jquery.dataTables.min.css', '1.10.18', true );
               wp_enqueue_script( 'datatable-script', 'https://cdn.jsdelivr.net/npm/[email protected]/media/js/jquery.dataTables.min.js', array( 'jquery' ) );
    wp_enqueue_script('/*here*/ theme-script', get_template_directory_uri() . '/js/script.js' );
    } 
    add_action( 'wp_enqueue_scripts', 'libs_import' );
    in reply to: Help ! All my fields gone ! #37443
    YasmineYasmine
    Participant

    Hi - this just happened to me too. All of my fields are gone.

    in reply to: CPT stuck as "Post" type #37429
    YasmineYasmine
    Participant

    *back (not stuck)

    in reply to: CPT stuck as "Post" type #37427
    YasmineYasmine
    Participant

    Hi Long,

    Adding the prefix got the data stuck. But it didn't fix not being able to use the file field in a field group - without it breaking!

    Many thanks,
    Yasmine

    in reply to: CPT stuck as "Post" type #37414
    YasmineYasmine
    Participant

    ...However after finally managing to change my post type back to my CPT, I am still unable to get my data back on the frontend. Everything is now saved in custom fields, rather than in my CPT. Changing the post type did not fix it.

    in reply to: CPT stuck as "Post" type #37412
    YasmineYasmine
    Participant

    Hi Long - just an update to this. I found the issue. I was trying to adding a file field within a group field. After trying to update my custom fields, it automatically saves to a 'post' post type. I tried with file upload and file. Then I tried with file advanced and the whole thing crashed

    in reply to: CPT stuck as "Post" type #37411
    YasmineYasmine
    Participant

    I will contact them. But just wondering, have you ever come across the meta box custom field type getting stuck and being unable to change - and have any idea how to fix. I only ask as I disabled every plugin and the problem was still there!

    in reply to: Outputting user value in array #37393
    YasmineYasmine
    Participant

    Got it working using sprintf - but it turned out shouldn't have been displaying as an array in first place (a third party plugin was modifying it). So all sorted. Thanks again.

    in reply to: Moving meta box group #37392
    YasmineYasmine
    Participant

    I did a little experiment, but was hoping was missing trick. Thank you for clarifying!

    in reply to: Outputting user value in array #37382
    YasmineYasmine
    Participant

    Actually - it is still not working.

    On an admin account it outputs: string(1) "P"

    And for a non-admin role it outputs: string(9) "Professor"

    Can't seem to just get the "professor" part!

    in reply to: Outputting user value in array #37381
    YasmineYasmine
    Participant

    Thanks Long!

    in reply to: Elementor Groups - not looping #37380
    YasmineYasmine
    Participant

    Fixed

    in reply to: Outputting user value in array #37314
    YasmineYasmine
    Participant

    Thank you Long, I appreciate it. There are two fields

    Academic position:

    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'  => __( 'Profile: Academic Profile', 'your-text-domain' ),
            'id'     => 'academic_profile',
            'type'   => 'user',
            'fields' => [
                [
                    
                [
                    'name'          => __( 'Academic Position', 'your-text-domain' ),
                    'id'            => $prefix . 'academic_position',
                    'type'          => 'select',
                    'options'       => [
                        'Distinguished Professor' => __( 'Distinguished Professor', 'your-text-domain' ),
                        'Honorary Professor'      => __( 'Honorary Professor', 'your-text-domain' ),
                        'Professor'               => __( 'Professor', 'your-text-domain' ),
                        'Associate Professor'     => __( 'Associate Professor', 'your-text-domain' ),
                        'Assistant Professor'     => __( 'Assistant Professor', 'your-text-domain' ),
                        'Senior Lecturer'         => __( 'Senior Lecturer', 'your-text-domain' ),
                        'Lecturer'                => __( 'Lecturer', 'your-text-domain' ),
                        'Associate Lecturer'      => __( 'Associate Lecturer', 'your-text-domain' ),
                        'Junior Lecturer'         => __( 'Junior Lecturer', 'your-text-domain' ),
                        'Postdoctoral Researcher' => __( 'Postdoctoral Researcher', 'your-text-domain' ),
                        'PhD Researcher'          => __( 'PhD Researcher', 'your-text-domain' ),
                        'Reader'                  => __( 'Reader', 'your-text-domain' ),
                        'Senior Research Fellow'  => __( 'Senior Research Fellow', 'your-text-domain' ),
                        'Research Fellow'         => __( 'Research Fellow', 'your-text-domain' ),
                        'Research Assistant'      => __( 'Research Assistant', 'your-text-domain' ),
                        'Research Consultant'     => __( 'Research Consultant', 'your-text-domain' ),
                        'Researcher'              => __( 'Researcher', 'your-text-domain' ),
                        'Journalist'              => __( 'Journalist', 'your-text-domain' ),
                        'Writer'                  => __( 'Writer', 'your-text-domain' ),
                    ],
                    'admin_columns' => 'after title',
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    And academic_title

    
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'  => __( 'Profile: About You', 'your-text-domain' ),
            'id'     => 'basic_profile',
            'type'   => 'user',
            'fields' => [
                [
                    'name'    => __( 'Academic Title', 'your-text-domain' ),
                    'id'      => $prefix . 'academic_title',
                    'type'    => 'select_advanced',
                    'options' => [
                        'Dr'        => __( 'Dr', 'your-text-domain' ),
                        'Professor' => __( 'Professor', 'your-text-domain' ),
                    ],
                    'columns' => 2,
                ],
    

    And hard to share screenshot (although still can), but here is a copy and paste:

    array(1) { [0]=> string(2) "Dr" }
    NICE Test
    array(1) { [0]=> string(18) "Associate Lecturer" }

Viewing 15 posts - 136 through 150 (of 244 total)