Support Forum ยป User Profile

Forum Replies Created

Viewing 15 posts - 2,191 through 2,205 (of 3,702 total)
  • Author
    Posts
  • in reply to: Groups revisions don't work #9413
    Anh TranAnh Tran
    Keymaster

    Thanks for letting us know. Let me check and fix it.

    in reply to: issue for tabs #9395
    Anh TranAnh Tran
    Keymaster

    Oh, I see. It's MakiPlace's responsible to update the extensions for you. In the meantime, I've just added the Developer Bundle to your account and you can download the latest version of extensions. Please try and let me know how it goes.

    in reply to: Not able to get post_id in config as documented #9388
    Anh TranAnh Tran
    Keymaster

    Sorry, the docs is incorrect. The submitted post ID is added separately as the 2nd parameter of the hook. Please change the code to this:

    add_action ('rwmb_frontend_after_process','emnsh_rwmb_frontend_after_process', 10, 2);
    function emnsh_rwmb_frontend_after_process($config, $post_id) {
        if ($post_id') {
            $name = rwmb_meta('emnsh-name');
            wp_update_post(array(
                'ID' =>  $config['post_id'],
                'post_title'=>$name
            ));
        }
    }

    I also updated the docs.

    in reply to: How to set a upload directory for file_upload #9381
    Anh TranAnh Tran
    Keymaster

    Hi,

    The plugin doens't change the way WP handles the upload process. Probably the ajax part has some issue. Let me see if I can do anything.

    Anh TranAnh Tran
    Keymaster

    This code:

    $birra = isset( $passaggio['et2018-nome_birra'] ) ? $passaggio['et2018-nome_birra'] : '<a href="'.get_the_permalink().'" title="'.get_the_title().'"><p>Birra: '.$birra.'</p></a>';

    is wrong and can't work.

    This code:

    if (isset($passaggio['et2018-nome_birra'])){
                        $birra = $passaggio['et2018-nome_birra'];
                    }
    echo '<a href="'.get_the_permalink().'" title="'.get_the_title().'"><p>Birra: '.$birra.'</p></a>';

    works. But it will show a warning if there is no value for $passaggio['et2018-nome_birra']. And in case there's no value, it still show the <a> link.

    Please try this instead:

    $birra = isset($passaggio['et2018-nome_birra']) ? $passaggio['et2018-nome_birra'] : '';
    if ($birra) {
        echo '<a href="'.get_the_permalink().'" title="'.get_the_title().'"><p>Birra: '.$birra.'</p></a>';
    }
    in reply to: issue for tabs #9372
    Anh TranAnh Tran
    Keymaster

    I got it. The HTML is different because of the MB Columns. You probably activated and used it on your localhost. Please try deactivating it first.

    Anyway, I tested with the tabs and columns and they work pretty well together. Do you use the latest version of both plugins? Can you post your code here to test?

    Anh TranAnh Tran
    Keymaster

    I think it's better to check like this:

    $birra = isset( $passaggio['et2018-nome_birra'] ) ? $passaggio['et2018-nome_birra'] : '';

    So the variable is always available and won't display any warning if you do echo $birra;.

    PS: You can get the group value your way or use the helper function like this:

    $passaggio = rwmb_meta( 'gruppo_birra' );

    In your code, please make sure the global $post is available. Otherwise it won't work. You can try this instead:

    $passaggio = get_post_meta( get_the_ID(), 'gruppo_birra', true );

    in reply to: issue for tabs #9359
    Anh TranAnh Tran
    Keymaster

    Hello,

    I've just tested the tabs and there's no problem with clicking. Can you please try again? Maybe there's some JS errors somewhere else that could break the plugin's behavior?

    Anh TranAnh Tran
    Keymaster

    Hi,

    The filter:

    $new = apply_filters( "rwmb_{$field['id']}_value", $new, $field, $old );

    means that the value of the field ($new) will run through a filter called rwmb_YOURFIELDID_value. This filter has 3 params:

    • $new: the submitted value of the field
    • $field: field settings (array)
    • $old: the current value of the field, which is stored in the custom field. If field is new, then it's an empty string.

    So, to add a filter to change the field value, please run:

    add_filter( 'rwmb_YOURFIELDID_value', function( $new, $field, $old ) {
        $new = 'Your new value';
        return $new;
    }, 10, 3 );

    Just add it to your functions.php file of your theme. That's all.

    Hope that's clear ๐Ÿ™‚

    in reply to: Composer #9357
    Anh TranAnh Tran
    Keymaster

    No problem, all done! I've just added composer/installers and set the package type to wordpress-plugin. Now you can use it ๐Ÿ™‚

    Anh TranAnh Tran
    Keymaster

    You can use rwmb_{$field_type}_value or rwmb_{$field_id}_value. Please see this docs.

    in reply to: Prevent terms order being overwritten when updating post #9346
    Anh TranAnh Tran
    Keymaster

    No problem. The MB Custom Taxonomy only set the taxonomy parameters. Other things are handled by WordPress itself.

    I think we can close this topic :). Have a nice day!

    in reply to: Prevent terms order being overwritten when updating post #9344
    Anh TranAnh Tran
    Keymaster

    Ooops, I was thinking you're using the taxonomy field from Meta Box. If you're using the WordPress's core meta box for post tag, then it's out of the scope of the plugin. Maybe you should open a ticket for WordPress team?

    in reply to: Prevent terms order being overwritten when updating post #9340
    Anh TranAnh Tran
    Keymaster

    Hi,

    I'm not sure if the select advanced library support changing order of selected items. AFAIK it doesn't. That's why I was curious about how did you set the order for the terms in the previous reply.

    The current workaround pushes the selected items to the bottom of the list and un-selected items to the top. It's kind of the unfriendly experience for users, but that's the only way to preserve the order of selected items. (You can see the details in the Github link I posted above. It's worth noting that this is a temporary solution, as it's NOT supported by the select2 library).

    By the way, can you post the code you use for post_tag with Meta Box?

    in reply to: WP_Query meta query on group field #9330
    Anh TranAnh Tran
    Keymaster

    Hi Mark,

    It's kind of impossible for group. Group saves value as an serialized array, that's unable to query by. If you really need to query by a field, please make it a standalone field, not in a group.

Viewing 15 posts - 2,191 through 2,205 (of 3,702 total)