Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,926 through 2,940 (of 3,707 total)
  • Author
    Posts
  • in reply to: orderby date #4738
    Anh TranAnh Tran
    Keymaster

    If so, you can set the timestamp parameter for the field true. This will make the field save the timestamp instead of date string, so you can sort by that, while still display in the correct format to users.

    You can see the docs here.

    in reply to: orderby date #4736
    Anh TranAnh Tran
    Keymaster

    You query is correct. However, the problem here is the value you saved for date has the format "dd/mm/yyyy" which will cause the incorrect order when sorting. I suggest you use "yyyy-mm-dd" format, which is safe when ordering.

    in reply to: Checkbox List #4722
    Anh TranAnh Tran
    Keymaster

    Hello, please take a look at this sample code:

    https://gist.github.com/rilwis/a05896c8c3782d20369743fde68edcf8

    Anh TranAnh Tran
    Keymaster

    Currently not, but I think and "id" should be:

    - unique per fields
    - use only lower characters with dash or underscores to separate words (think it like slugs or keys of an array)

    That's all. Very simple 🙂

    in reply to: Shortcode in WYSIWYG type #4701
    Anh TranAnh Tran
    Keymaster

    That's correct. The field doesn't apply any filters to make shortcode runs. The filter the_content does that. But you might want to use just do_shortcode() function as the_content often triggers some other unexpected functions (like social plugin might hook into it to insert social buttons).

    $text = rwmb_meta( 'wsmbox_page_two_columns_text' );
    echo do_shortcode( wpautop( $text ) );
    Anh TranAnh Tran
    Keymaster

    Don’t use "content" as the wysiwyg field ID as it’s used for the main post content. That breaks the JS code for the field. Please try changing it to something else.

    in reply to: Amazon S3 Offload Plugin #4678
    Anh TranAnh Tran
    Keymaster

    Which field type do you use? If you use image_advanced field, then Meta Box only stores the attachment ID, not the URL.

    in reply to: Images attached to a custom post type #4664
    Anh TranAnh Tran
    Keymaster

    That seems the way WP stores attachment. I mean the way your old plugin stores images.

    The callback you mentioned in another topic is used to **display** the images only. It doesn't help add/remove more images in the custom fields.

    in reply to: Images attached to a custom post type #4662
    Anh TranAnh Tran
    Keymaster

    Hi Martin,

    That depends on how you store the images in the post meta. With Meta Box, image IDs are saved in the post meta (each image ID is saved a meta key). You can read more about that here.

    If the old plugin saves image IDs in the post meta in the same way as Meta Box, then Meta Box can show them without problem.

    But if it saves image URLs in the post meta, then you might want to use the field file_input instead (with clone parameter enabled if you have multiple images).

    And in the worst case, you can write a script to migrate the old data to the new format compatible with Meta Box.

    in reply to: Tabs with an external Link #4661
    Anh TranAnh Tran
    Keymaster

    Unfortunately it's not possible with the plugin.

    in reply to: Insert array in jquery #4655
    Anh TranAnh Tran
    Keymaster

    Hi, can you explain what "array of results" is? Do you mean the meta values saved in the database?

    in reply to: Wysiwyg id in group #4645
    Anh TranAnh Tran
    Keymaster

    I think the problem is 2 wysiwyg fields have the same ID. You need to change them to have different IDs.

    in reply to: Wysiwyg id in group #4635
    Anh TranAnh Tran
    Keymaster

    I see you’re using Advanced TinyMCE plugin. Can you try deactivating it and checking again?

    in reply to: Cloning getting slow #4634
    Anh TranAnh Tran
    Keymaster

    Thanks for your report. Yes, the JavaScript code to clone fields works heavily based on jQuery-DOM manipulating. So, it’s a little slow for large meta box or for a field with lots of clones. I will take a note and improve it.

    in reply to: Custom Post Repeater in New Field #4633
    Anh TranAnh Tran
    Keymaster

    Maybe just use get_post_types()?

Viewing 15 posts - 2,926 through 2,940 (of 3,707 total)