Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,276 through 1,290 (of 3,707 total)
  • Author
    Posts
  • in reply to: I cannot get custom fields to display, thanks #13880
    Anh TranAnh Tran
    Keymaster

    Hi Sean, I've just re-tested and don't see that problem. Is that the same code as above?

    in reply to: Date format between custom field and database field #13879
    Anh TranAnh Tran
    Keymaster

    According to MySQL docs:

    The TIMESTAMP syntax produces a DATETIME value in MySQL because DATETIME has a range that more closely corresponds to the standard SQL TIMESTAMP type, which has a year range from 0001 to 9999.

    That means TIMESTAMP has the exact format as DATETIME, which is Y-m-d H:i:s. It's not the same as the Unix timestamp as we use in PHP.

    And saving date with format Y-m-d still makes it sortable. So, it's okay to set the column type to DATETIME and set the save_format as Y-m-d.

    in reply to: New columns not being added to already existing tables #13868
    Anh TranAnh Tran
    Keymaster

    Hi, you need to call MB_Custom_Table_API::create on init hook or some hook. Do not call this only once when activate a plugin or a theme. The plugin auto detects the new table structure and upgrade it.

    in reply to: Dropdown disable option #13867
    Anh TranAnh Tran
    Keymaster

    Hi,

    I think you need to use select2 API. Your code seems to work only for normal select.

    in reply to: Date format between custom field and database field #13866
    Anh TranAnh Tran
    Keymaster

    Hi Sergio,

    This is a great question! While saving the date with varchar is not a problem, I think saving in date format of MySQL might be a better idea. However, as you see, MySQL forces data saved in the DB in its format, not what you enter. So, I think there are 2 solutions for this:

    1. Just use varchar, so you save what you enter
    2. Use the save_format attribute for the field, set it to the format of MySQL and you're free to go. It tells Meta Box to store value in one format and display in another format.
    Anh TranAnh Tran
    Keymaster

    Can you send me a temporary admin account to check and fix that?

    in reply to: Metabox Plugin issue #13861
    Anh TranAnh Tran
    Keymaster

    Yes, of course, I will.

    in reply to: Cannot get custom fields to display on a taxonomy page #13856
    Anh TranAnh Tran
    Keymaster

    Hi Toomas,

    Can you var_dump( $term_id ) to see if that's the correct ID of the current term?

    in reply to: Take settings values in add_action( 'init' #13855
    Anh TranAnh Tran
    Keymaster

    I got it. Let me summarize the process flow that you're trying to do:

    1. Getting settings
    2. Use the settings to register a CPT
    3. Register custom fields for the CPT

    If you don't do the step 3, then you can do both steps 1+2 at priority 30. The CPT will be registered without any problem.

    A better solution is getting the settings with get_option, like this:

    $option = get_option( 'multi_tema_privado' );
    $mb_activacion_articulo = $option['modulo_articulos_activacion'] ?? '';
    if ($mb_activacion_articulo == 1) $show_articulo = true;    
    $mb_slug_articulo = $option['modulo_articulos_slug'] ?? '';
    in reply to: I cannot get custom fields to display, thanks #13854
    Anh TranAnh Tran
    Keymaster

    Hi Sean,

    You're using field ID coaching_lesson_summary in the helper function. But the real ID is $prefix . 'coaching_lesson_summary', which is prefix-coaching_lesson_summary. So, your code should be:

    $value = rwmb_meta( 'prefix-coaching_lesson_summary' );
    echo $value;
    in reply to: Metabox Plugin issue #13841
    Anh TranAnh Tran
    Keymaster

    I got it. I've fixed it here. Can you take a look?

    Anh TranAnh Tran
    Keymaster

    Hi Ale, can you var_dump( $image_fields ) to see what values it has?

    in reply to: Metabox Plugin issue #13835
    Anh TranAnh Tran
    Keymaster

    I've just tested again on Firefox and Chrome and couldn't replicate the bug. Would you mind giving me the code for the slider field?

    in reply to: Metabox Plugin issue #13829
    Anh TranAnh Tran
    Keymaster

    Hi, thanks for your feedback. I'm checking it now.

    Anh TranAnh Tran
    Keymaster

    Hi Ale, can you post the code you use on those locations?

Viewing 15 posts - 1,276 through 1,290 (of 3,707 total)