Support Forum Β» User Profile

Forum Replies Created

Viewing 15 posts - 61 through 75 (of 94 total)
  • Author
    Posts
  • in reply to: βœ…Translate fields in cloneable field group with WPML #37370
    ArnoArno
    Participant

    Hi Long,

    Ok, thanks. Since Meta Box is compatible with WPML, I expected custom fields to be translatable everywhere: in cloneable groups, settings pages (https://support.metabox.io/topic/translate-fields-in-settings-pages-with-wpml/), views, etc. Our project depends on this.

    1) When will this work? Approximately?
    2) What's a work around in the mean time? Can the entire group be translated, for example, rather than selecting individual fields within the group?
    3) Are there any other limitations currently?

    in reply to: How to translate content in user profile meta fields? #37349
    ArnoArno
    Participant

    It would be interesting if someone answered this. I may need this too.

    ArnoArno
    Participant

    Thanks, I just filled out the form.

    ArnoArno
    Participant

    Ok, thank you. WordPress must improve there πŸ™‚

    ArnoArno
    Participant

    Hi Long,

    Thanks a lot. That fixed it!

    ArnoArno
    Participant

    Hi FranΓ§ois,

    Please post the solution here if possible. I'm using Admin Columns Pro as well. Great plugin.

    ArnoArno
    Participant

    Thanks. I'm doing exactly what you did and nothing is rendered. How can I send you a login to my site?

    ArnoArno
    Participant

    Thanks, that works for me!

    Now there's one more thing I'd like to change. I want to keep the original "lat, long, zoom" value in the field, and save the adjusted "lat, long" value in a different field. So I have both formats and I can pick the one I need. I created an extra text field in the same field group.

    I changed the field ID in this line:
    update_post_meta( $object_id, 'id_of_text_field', $map );

    But it's not saved. I suppose I need to do something different because it's a text field and not a map field?

    in reply to: βœ…Show custom fields metabox on specific page only #37134
    ArnoArno
    Participant

    AJ Troxell, you may need to enable the Conditional Logic extension: https://docs.metabox.io/extensions/meta-box-conditional-logic/

    ArnoArno
    Participant

    By the way, I was able to retrieve the values of a Text and Checkbox field from the Page Settings, through Kadence Blocks. So the fields basically works, it's just that the code inserted into the view via the Insert Field button does not work.

    ArnoArno
    Participant

    Hi,

    Here's the field group:

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'          => __( 'Site settings - Texts', 'your-text-domain' ),
            'id'             => 'site-settings-texts',
            'settings_pages' => ['site-configuration'],
            'tab'            => 'tab3',
            'fields'         => [
                [
                    'name'              => __( 'Maps not available', 'your-text-domain' ),
                    'id'                => $prefix . 'site_settings_texts_maps_not_available',
                    'type'              => 'text',
                    'label_description' => __( 'Text to show when maps are not available at all', 'your-text-domain' ),
                ],
                [
                    'name'              => __( 'Maps for authenticated users only', 'your-text-domain' ),
                    'id'                => $prefix . 'site_settings_texts_maps_for_authenticated_users_only',
                    'type'              => 'text',
                    'label_description' => __( 'Text to show when maps are only available to authenticated users', 'your-text-domain' ),
                ],
                [
                    'name'              => __( 'Read more', 'your-text-domain' ),
                    'id'                => $prefix . 'site_settings_texts_read_more',
                    'type'              => 'text',
                    'label_description' => __( 'Button or link text to click to more details', 'your-text-domain' ),
                ],
                [
                    'name'              => __( 'Advanced filters', 'your-text-domain' ),
                    'id'                => $prefix . 'site_settings_texts_advanced_filters',
                    'type'              => 'text',
                    'label_description' => __( 'Label for "Advanced filters"', 'your-text-domain' ),
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    Here's the settings page:

    <?php
    add_filter( 'mb_settings_pages', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $settings_pages ) {
    	$settings_pages[] = [
            'menu_title' => __( 'Site configuration', 'your-text-domain' ),
            'id'         => 'site-configuration',
            'position'   => 80,
            'style'      => 'no-boxes',
            'columns'    => 1,
            'tabs'       => [
                'tab1' => 'General',
                'tab2' => 'Maps',
                'tab3' => 'Texts',
            ],
            'tab_style'  => 'left',
            'icon_url'   => 'dashicons-admin-generic',
        ];
    
    	return $settings_pages;
    }
    ArnoArno
    Participant

    Yes, a collapsed group indeed. I have many fields, so all groups are collapsed by default to prevent overwhelming the editor.

    Thanks Long!

    in reply to: Pass custom view data to PHP code #37120
    ArnoArno
    Participant

    It looks like the dynamic tags that are used to pass data to the view are parse after the shortcode is parsed.

    [mbv name="display-related-things" vw_postid={{post:id}}]

    I'm not sure yet. Will look into it and update here.

    in reply to: Pass custom view data to PHP code #37114
    ArnoArno
    Participant

    Hi Long,

    I just tried this:

    {% set listing_current_post_type = vw_posttype %}
    Type is {{listing_current_post_type}}, length is {{listing_current_post_type|length}}

    The output is this:
    Type is activity, length is 13

    It should be 8 characters, but it counts 13. That's the problem.

    I can't use the hardcoded string, the values are dynamic.

    I can give you access to the site if it's not possible to solve this here.

    ArnoArno
    Participant

    How do I get that code? I created it through the UI with MB Settings Page.

Viewing 15 posts - 61 through 75 (of 94 total)