Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,971 through 2,985 (of 3,958 total)
  • Author
    Posts
  • in reply to: Date picker not appearing #4843
    Anh TranAnh Tran
    Keymaster

    Hi Mark,

    I've just tested with the date field type built with the MB Builder and I see it works. Can you try deactivating all plugins and check it again? I think there might be a JavaScript conflict somewhere.

    Can you also check if there's any error shown in the Console when editing a post?

    Thanks

    in reply to: Display custom post custom fields everywhere in frontend #4842
    Anh TranAnh Tran
    Keymaster

    Hi Sergey,

    To get the post meta and show it in the frontend, you can use the rwmb_meta function with the last parameter for the post ID:

    $meta = rwmb_meta( 'field_id', $args, $post_id );
    echo $meta;

    Getting the post ID depends on your (probably custom) query/structure of the website. If you're using WP_Query class to query posts and use $query->the_post() in the custom loop, then you can omit that parameter, like this:

    $query = new WP_Query( array(
        'post_type' => 'post',
        'posts_per_page' => 3,
    ) );
    if ( $query->have_posts() ) {
        while ( $query->have_posts() ) {
            $query->the_post();
            
            $meta = rwmb_meta( 'field_id' );
            echo $meta;
            // Other things in the loop that you want to display
        }
    }

    But if you don't use the similar code, you need to look at your code to get the correct post ID.

    It happens similarly for term meta, but in this case, you need to use get_term_meta() function and it requires the term ID:

    $meta = get_term_meta( $term_id, 'field_id', true );
    echo $meta;

    Again, the term ID depends on how you get the terms. If you're using get_terms function, then you might want to use this code:

    $terms = get_terms( array(
        'taxonomy' => 'category',
        'number' => 3,
    ) );
    if ( ! is_wp_error( $terms ) && ! empty( $terms ) ) {
        foreach ( $terms as $term ) {
            $meta = get_term_meta( $term->term_id, 'field_id', true );
            echo $meta;
            // Echo something else
        }
    }

    Hope this helps.

    in reply to: Filter POST field items using other POST field #4835
    Anh TranAnh Tran
    Keymaster

    Dear Josue,

    Please try MB Conditional Logic:

    https://metabox.io/docs/meta-box-conditional-logic/

    Then in your Post field, you can visible when post_type = Títulos

    Best regards,

    Tan

    in reply to: MB Yoast and MB Tabs Extensions #4834
    Anh TranAnh Tran
    Keymaster

    Dear Sergey,

    Please try

    - In advanced tab, click "Add Attributes"
    - In key box, enter add_to_wpseo_analysis
    - In value box, enter true
    - Then save meta box

    Best regards,

    Tan

    in reply to: Duplicate not working #4833
    Anh TranAnh Tran
    Keymaster

    Dear Dave,

    Duplicate Meta Box feature isn't Builder feature, this belongs to other plugin and we don't support duplicate whole meta box.

    Cheers!

    Tan

    in reply to: Display custom terms image_advanced on page frontend #4826
    Anh TranAnh Tran
    Keymaster

    Hi Sergey,

    Do you mean showing the meta boxes when creating in a new term, not when editing a term? And I'm quite confuse about "post_id" here, what do you mean by that?

    in reply to: Duplicate not working #4821
    Anh TranAnh Tran
    Keymaster

    Hi Dave, are you using a plugin to duplicate a custom post type? Can you tell me which one?

    Thanks

    in reply to: MB Yoast and MB Tabs Extensions #4820
    Anh TranAnh Tran
    Keymaster

    Hi Sergey, can you send me a screenshot of your meta box built with the Builder extension? Did you mean that previously it worked with the code when adding 'add_to_wpseo_analysis' => true?

    in reply to: Conditional logic + clonable group #4817
    Anh TranAnh Tran
    Keymaster

    Thank you Jackky! I will update the docs and check the JS issue.

    in reply to: Conditional logic + clonable group #4801
    Anh TranAnh Tran
    Keymaster

    Hi Jackky, I see you have several fields with the same ID front_cat. That breaks the functionality of the plugin, even it’s toggled by the Conditional Logic. You need to change the field IDs to make sure each field has an unique ID. Then the condition will work.

    in reply to: MB Yoast and MB Tabs Extensions #4800
    Anh TranAnh Tran
    Keymaster

    Hi Sergey, can you please post your code here?

    in reply to: How to automatically replace text/url's in wp_postmeta #4795
    Anh TranAnh Tran
    Keymaster

    Hi, the job of search and replace URL in the database is very common while migrating a WordPress site. You can do that in many ways in general, not specific for Meta Box by using:

    WordPress search and replace tool: this tool is one of the best tool to do this job with GUI

    WP-CLI search-replace command provides a same way to do that with command line. If you’re using Windows, you might want to follow this tutorial to install WP-CLI on Windows.

    Both tools allow you search and replace a string in the whole database or in a specific table (wp_postmeta).

    in reply to: Precheck Checkbox #4794
    Anh TranAnh Tran
    Keymaster

    Hi, the checkbox saves value as 1 or 0. To make it checked by default, just set the std to 1.

    in reply to: Use Metabox in Frondend #4787
    Anh TranAnh Tran
    Keymaster

    Currently, you can't

    in reply to: Parent Post ID #4786
    Anh TranAnh Tran
    Keymaster

    Dear Gab,

    Yes, you can display meta box based on parent post id with Conditional Logic or Include Exclude extension.

    Cheers!

Viewing 15 posts - 2,971 through 2,985 (of 3,958 total)