Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 2,896 through 2,910 (of 3,707 total)
  • Author
    Posts
  • in reply to: Hooking Into Core Metaboxes #4945
    Anh TranAnh Tran
    Keymaster

    No, the plugin doesn't have that functionality.

    in reply to: How to prevent uploads for plupload_image field type? #4914
    Anh TranAnh Tran
    Keymaster

    Hi,

    We used to allow users to set parameters for plupload, but we removed that part in version 4.9.x to make all the media fields use the same codebase. There were almost no users used that.

    I will check on this to see if we can add something back.

    in reply to: Fatal error on save MB #4893
    Anh TranAnh Tran
    Keymaster

    @Tan: I've forwarded the credentials to you via email. Please check.

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

    Glad that you solved the problem! Feel free to open any topic if you have any trouble.

    in reply to: Term Meta Oembed returns video link #4867
    Anh TranAnh Tran
    Keymaster

    I've just replied you in that topic. Let's discuss there to keep focused 🙂

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

    Hi Sergey,

    Here is an example of showing related posts:

    https://gist.github.com/rilwis/91f42412efc40f7a7d991779cc500d59

    in reply to: Term Meta Oembed returns video link #4864
    Anh TranAnh Tran
    Keymaster

    Hi Sergey,

    Yes, that's correct. The helper function returns only raw data of term meta value. It doesn’t return meaningful information for images, file, oembed. To make the oembed renders the video, please use this code:

    $meta = get_term_meta(get_queried_object()->term_id, 'rw_tax_video', true );
    $meta = RWMB_OEmbed_Field::get_embed( $meta );
    echo $meta;

    For more info, please read this documentation.

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

    Hi,

    If you change only the post meta value, then nothing happens. Please try search and replacing only on the column meta_value in the table wp_postmeta.

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

    I got it now. Looks like that's the same problem in the new topic. As I said in that topic, depending on your code, you should get the term ID somehow, and use the function get_term_meta to get the uploaded images.

    And as the documentation says, the value stored for image_advanced field is an array of image IDs. You need to use a helper function like wp_get_attachment_image_url() to get the image URL.

    Here is a sample code:

    https://ghostbin.com/paste/vny57

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

    Hi weseo,

    You just need to change this:

    array(
        'name'       => 'Категория для отображения',
        'id'         => 'CHANGE_THIS_TO_SOMETHING_ELSE',
        'type'       => 'taxonomy_advanced',
        'taxonomy'   => 'costumes',
        'field_type' => 'select',
        'hidden'     => array( 'front_cat_type', '!=', 'costume' )
    ),
    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: 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?

Viewing 15 posts - 2,896 through 2,910 (of 3,707 total)