Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,171 through 1,185 (of 3,707 total)
  • Author
    Posts
  • in reply to: Integrating with Astra #14320
    Anh TranAnh Tran
    Keymaster

    Hey guys,

    The MB Settings Page plugin works with all kind of options and normal WordPress Customizer's settings (as customizer settings are also saved in an option).

    However, to make sure it works with Astra, you might need to confirm 2 things:

    • Astra is using an option (or native WordPress customizer settings) to save its own settings
    • The data format of settings in Astra matches the way Meta Box saves data.

    For example:

    WordPress Customizer saves logo as an ID of the attachment page, which is compatible with Meta Box's single image field. If Astra does the same, then they can work together.

    This is the most important thing. I'm not an experienced user with Astra (I tested it, but haven't looked into it thoroughly), so please test it yourself.

    If you want to link to a specific section in the Customizer, then here is the solution.

    in reply to: Is it possible to create front-end user relationships? #14318
    Anh TranAnh Tran
    Keymaster

    Hi,

    Yes, these plugins work well together. Our goal is making all plugins working together, and they do. There are only a few exceptions, but it's not this case.

    Please just try them and let me know if you need any help.

    in reply to: Metabox Issue #14317
    Anh TranAnh Tran
    Keymaster

    Can you clear browser cache and try again? I can't replicate the bug on my localhost. What's the code for the field?

    in reply to: Will builder create the custom tables #14316
    Anh TranAnh Tran
    Keymaster

    Hi Dave,

    No, the Builder doesn't create the custom tables for you. You need to do that manually. Please follow this instruction.

    in reply to: How to refer to cloneable single_image field? #14315
    Anh TranAnh Tran
    Keymaster

    Can you turn on debug and see what the error is? My code is created in my mind without testing, so it might have some conflict.

    in reply to: Category and Subscategory include in URL structure #14314
    Anh TranAnh Tran
    Keymaster

    Hi William,

    Thanks for using Meta Box!

    Your question is an advanced question, and it's quite complicated since it relates to WordPress Rewrite API. Our plugins don't handle that work. However, you can find some solution on the internet. Here are some of them:

    https://wisdmlabs.com/blog/add-taxonomy-term-custom-post-permalinks-wordpress/
    https://wordpress.stackexchange.com/questions/49141/rewriting-a-custom-post-type-permalink-with-taxonomy-term
    https://wordpress.stackexchange.com/questions/108642/permalinks-custom-post-type-custom-taxonomy-post

    in reply to: hierachical taxonomy select tree #14313
    Anh TranAnh Tran
    Keymaster

    Hi Toomas,

    I'm afraid I haven't seen any site or plugin doing this. The only way I can think of is using a custom code. But I don't have any sample at the moment.

    Anh TranAnh Tran
    Keymaster

    Hi,

    I think to remove the duplicated code, you can store all the fields in a variable $fields and set it for 2 meta boxes (each for each post type):

    add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) {
        $fields = []; // your fields
    
        $meta_boxes[] = [
            'post_types' => 'post_type_1',
            'custom_table' => 'table_1',
            'fields' => $fields,
        ];
    
        $meta_boxes[] = [
            'post_types' => 'post_type_1',
            'custom_table' => 'table_1',
            'fields' => $fields,
        ];
    
        return $meta_boxes;
    } );

    That way, you don't have to repeat a large part of code. Also see this tutorial.

    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    1. Was that correct to do?

    Yes! Sorry, my mistake. I missed the "s".

    1. How do you use Meta Box shortcodes to output group fields?

    The shortcode only outputs list of data of sub-fields in a group. I'd not recommend using it for groups. Instead, write your own shortcode, like what you did with group_monthly_calendar shortcode.

    1. Yes it was in the field. But now since I changed it to be in a group I don’t know what the ID would be to test again.

    As you need to get the PDF file URL, try modifying your shortcode to this:

    add_shortcode( 'group_monthly_calendar_pdf_url', function( $atts ) {
        $output = '';
        $group = rwmb_meta( 'group_cal_pdf' );
        $file_ids = isset( $group['cal_pdf'] ) ? $group['cal_pdf'] : null;
        $file_id = empty( $file_ids ) ? null : reset( $file_ids );
        $file = RWMB_File_Field::file_info( $file_id );
        if ( is_array( $file ) ) {
            return $file['url'];
        }
        return '';
    } );
    1. Are you having issues saving settings in the Group Field in MB Builder?

    I see. Thanks a lot for your video. I'll check and fix it.

    1. File Advanced showing “max number of files” even though I did not select the “show status” check box.

    Thanks. Let me check and fix it.

    1. If you remove the “Label” for the Group field – but then you add a “Group title text” it seems like that should then show up where the normal “Label” field showed. Currently all my “group” fields are blank. See the above video link.

    I see. Thanks a lot for your video. I'll check and fix it.

    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    Thanks for your feedback. It's fixed here.

    in reply to: hierachical taxonomy select tree #14274
    Anh TranAnh Tran
    Keymaster

    Hi Toomas,

    Unfortunately, it's not possible with the plugin.

    in reply to: How to refer to cloneable single_image field? #14273
    Anh TranAnh Tran
    Keymaster

    Which PHP version are you using? I'm writing in PHP 5.4 (that accepts short array syntax). Please upgrade if you're using lower PHP version.

    in reply to: Limit the number of "favorites" in radio buttons #14272
    Anh TranAnh Tran
    Keymaster

    Please try this:

    jQuery(document).ready(function( $ ){
      $('.count input').attr('readonly', true);
      $('.radio').change(function () {
        // Counting.
        var count=0;
        $('.radio input:checked').each(function(){
          if ($(this).val().replace(/V_/g,'')=="Specialiteit") {
            count += 1;
          }
        });
        $('.count input').val(count);
    
        var $submitButton = $( '.rwmb-form-submit' ).children( 'button' );
        if ( count > 3 ) {
          $submitButton.prop( 'disabled', true );
        } else {
          $submitButton.prop( 'disabled', false );
        }
      });
    });
    in reply to: Can't Get Image Field to Display Image via Shortcode #14270
    Anh TranAnh Tran
    Keymaster

    Great video, Mark!

    Can you try again with rwmb_meta shortcode and the latest version of Meta Box on Github? I pushed a fix for the shortcode to get the correct post ID from the loop inside another page.

    Not sure why BB's shortcode not working. Let me check that.

    Anh TranAnh Tran
    Keymaster

    Hi, I've just checked and can't replicate the bug:

    https://imgur.elightup.com/VGrQIH1.png

    Can you try with no plugins activated and with normal post?

Viewing 15 posts - 1,171 through 1,185 (of 3,707 total)