Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 43 total)
  • Author
    Posts
  • in reply to: Timeticker field | Default value not saved #42678
    UnakritiUnakriti
    Participant

    Thanks for the confirmation.

    Hope you can provide a solution.

    Kind regards,

    in reply to: Use Settings Page for Site Title? #42027
    UnakritiUnakriti
    Participant

    Its an old thread but thanks @Long Nguyen. I found a solution that works for me. I am sharing a snippet (inserted on admin_init) below in case anyone else is interested.

    <?php
    $value_title = rwmb_meta( 'custom_field_site_title', [ 'object_type' => 'setting' ], 'site-options' );
    $value_tag = rwmb_meta( 'custom_field_tagline', [ 'object_type' => 'setting' ], 'site-options' );
    update_option('blogname', $value_title);
    update_option('blogdescription', $value_tag);

    The snippet updates the options in database whenever the custom fields on the Settings Page are edited.

    Kind regards,

    in reply to: How to add overlay image and icon on oEmbed YouTube video? #39633
    UnakritiUnakriti
    Participant

    Thanks Peter.

    This might make for a good MB tutorial and perhaps, a cool feature for the oEmbed field.

    Appreciate the links - I will review these and follow along.

    Kind regards,

    in reply to: Possible Conflict with Map Custom Field #39632
    UnakritiUnakriti
    Participant

    Yes, MB Views 1.11.4 does the trick. It's fixed.

    Thanks MB and Peter.

    Kind regards,

    UnakritiUnakriti
    Participant

    Here's an example

    sample of video overlaid image with play icon

    Imgur Link

    Kind regards,

    in reply to: Possible Conflict with Map Custom Field #39581
    UnakritiUnakriti
    Participant

    Thanks and eagerly looking forward to an update on this one!

    in reply to: Possible Conflict with Map Custom Field #39067
    UnakritiUnakriti
    Participant

    Hi,

    Is this resolved now?

    Kind regards,

    in reply to: Possible Conflict with Map Custom Field #38628
    UnakritiUnakriti
    Participant

    Thank you for the confirmation, Long. Appreciate your support.

    I cannot change the order of the elements (image first and map second) because it won't fit into the article's flow.

    Any ETA on the fix?

    Kind regards,

    in reply to: Possible Conflict with Map Custom Field #38625
    UnakritiUnakriti
    Participant

    Thanks for your support, Long. I have shared the details, as requested.

    Kind regards,

    in reply to: Possible Conflict with Map Custom Field #38615
    UnakritiUnakriti
    Participant

    PS: Here's a screenshot to illustrate the problem further.

    https://imgur.com/a/YsKvupe

    Kind regards,

    in reply to: Possible Conflict with Map Custom Field #38613
    UnakritiUnakriti
    Participant

    Thanks for the Video, Long. In my scenario, the image and map custom fields are shown in separate views. Here's the requested code:

    Custom Field - Single Image

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'   => __( 'Post PIN', 'your-text-domain' ),
            'id'      => 'post-pin',
            'context' => 'side',
            'fields'  => [
                [
                    'name' => __( 'Title Pin', 'your-text-domain' ),
                    'id'   => $prefix . 'single_image_5x4mtt49jj',
                    'type' => 'single_image',
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    Custom Field - Text and Map

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'   => __( 'Location and Map', 'your-text-domain' ),
            'id'      => 'location-and-map',
            'context' => 'side',
            'fields'  => [
                [
                    'name' => __( 'Enter Country, Region, or City', 'your-text-domain' ),
                    'id'   => $prefix . 'text_8sy68td8rn7',
                    'type' => 'text',
                ],
                [
                    'name'          => __( 'Zoom Level', 'your-text-domain' ),
                    'id'            => $prefix . 'osm_v4fb8cliwlo',
                    'type'          => 'osm',
                    'address_field' => 'text_8sy68td8rn7',
                    'language'      => 'en',
                    'region'        => 'in',
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    View - Image
    <img src="{{ post.single_image_5x4mtt49jj.full.url }}" width="{{ post.single_image_5x4mtt49jj.full.width }}" height="{{ post.single_image_5x4mtt49jj.full.height }}" alt="{{ post.single_image_5x4mtt49jj.full.alt }}">

    View - Map
    {{ mb.map( 'post.osm_v4fb8cliwlo', '100%', '480px', '14' ) }}

    Thank you and look forward to your advise to resolve this.

    Kind regards,

    in reply to: Display Header Conditionally #38603
    UnakritiUnakriti
    Participant

    Seems like the following statement works instead:

    {% if post.title_pin_id.full.url is not null %}

    Kind regards,

    in reply to: Possible Conflict with Map Custom Field #38602
    UnakritiUnakriti
    Participant

    Here's the MB Views code:

    {{ mb.map( 'post.osm_id', '100%', '480px', '10' ) }}

    Kind regards,

    in reply to: Star Ratings Do not Save #38103
    UnakritiUnakriti
    Participant

    Thank you Long.

    I sincerely wish to use MB more productively and keep learning and hope to try this one again. But, for lack of time on this one, I will just need to consider a popular star rating plugin such as YASR.

    Will post more questions as I progress with MB.

    Appreciate your support.

    Kind regards,

    in reply to: Star Ratings in "Add Field" inside Field Group Editor #38102
    UnakritiUnakriti
    Participant

    Thank you Long.

    I sincerely wish to use MB more productively and keep learning. But, for lack of time on this one, I will just need to consider a popular star rating plugin such as YASR.

    Appreciate your support.

    Kind regards,

Viewing 15 posts - 16 through 30 (of 43 total)