Forum Replies Created
-
AuthorPosts
-
Unakriti
ParticipantThanks for the confirmation.
Hope you can provide a solution.
Kind regards,
Unakriti
ParticipantIts 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,
December 9, 2022 at 11:14 AM in reply to: ✅How to add overlay image and icon on oEmbed YouTube video? #39633Unakriti
ParticipantThanks 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,
Unakriti
ParticipantYes, MB Views 1.11.4 does the trick. It's fixed.
Thanks MB and Peter.
Kind regards,
December 7, 2022 at 7:53 PM in reply to: ✅How to add overlay image and icon on oEmbed YouTube video? #39584Unakriti
ParticipantUnakriti
ParticipantThanks and eagerly looking forward to an update on this one!
Unakriti
ParticipantHi,
Is this resolved now?
Kind regards,
Unakriti
ParticipantThank 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,
Unakriti
ParticipantThanks for your support, Long. I have shared the details, as requested.
Kind regards,
Unakriti
ParticipantPS: Here's a screenshot to illustrate the problem further.
Kind regards,
Unakriti
ParticipantThanks 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,
Unakriti
ParticipantSeems like the following statement works instead:
{% if post.title_pin_id.full.url is not null %}Kind regards,
Unakriti
ParticipantHere's the MB Views code:
{{ mb.map( 'post.osm_id', '100%', '480px', '10' ) }}Kind regards,
Unakriti
ParticipantThank 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,
August 29, 2022 at 1:45 AM in reply to: ✅Star Ratings in "Add Field" inside Field Group Editor #38102 -
AuthorPosts