Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1,321 through 1,335 (of 3,707 total)
  • Author
    Posts
  • in reply to: Refund #13649
    Anh TranAnh Tran
    Keymaster

    I got it. I've looked at the CPT-Onomies plugin and found a solution for that. Please paste the following code into your theme/plugin:

    add_action( 'save_post', function( $post_id ) {
        prefix_save_custom_tax( $post_id, 'location', 'taxonomy_2' );
    }, 20 );
    
    function prefix_save_custom_tax( $post_id, $taxonomy, $field_id ) {
        global $cpt_onomies_manager, $cpt_onomy;
    
        // Make sure its a valid CPT-onomy.
        if ( ! $cpt_onomies_manager->is_registered_cpt_onomy( $taxonomy ) ) {
            return;
        }
    
        $new = isset( $_POST[ $field_id ] ) ? $_POST[ $field_id ] : array();
        $new = array_unique( array_map( 'intval', (array) $new ) );
        $new = empty( $new ) ? null : $new;
    
        // Set the terms.
        $cpt_onomy->wp_set_object_terms( $post_id, $new, $taxonomy );
    }

    Note that I separated the function that save terms, so you can call it multiple times for different taxonomy field.

    I hope that works for you. Please let me know after you tested it.

    Anh TranAnh Tran
    Keymaster

    Hello,

    Can you check if you passed the correct post ID? This is the only thing that I guess caused the bug.

    Anh TranAnh Tran
    Keymaster

    Hi Brian,

    You still need the premium plugins activated on the website to make the code work. The generated code is the work you want the plugins to do for you. And the whole process behind needs the premium plugins. If you want to keep the plugin list short, you can use the Meta Box AIO plugin. It has all free and premium plugins inside.

    in reply to: Visible/hidden with id outside group #13636
    Anh TranAnh Tran
    Keymaster

    Hi Charlin,

    The problem is when the group is cloneable, the conditions is "scoped" inside the clone only. Think about a situation when you have a group of 2 fields A and B. B is visible when A has a value "a".

    What about if we clone this group and have multiple pairs (A,B). A1 has a value "a", then all B will be visible without scoping, which is weird.

    I'll try to think about your situation and provide an update for this specific case.

    in reply to: By Post Field 'query args' with author #13635
    Anh TranAnh Tran
    Keymaster

    I think the problem is calling get_current_user_id too early. This docs page has an interesting comment:

    Before the plugins_loaded action it returns 0.

    So you might want to make some change to:

    add_action( 'init', function() {
         add_filter( 'rwmb_meta_boxes', 'your_register_function' );
    } );
    Anh TranAnh Tran
    Keymaster

    Hi guys,

    I guess this problem occur because the MB User Meta plugin is not active. It's required to make relationship from "user". Can you please check that?

    in reply to: Group not working properly #13633
    Anh TranAnh Tran
    Keymaster

    Hi Matthias, sorry I was looking to solve Ale's problem. Let me check with the group state.

    in reply to: Refund #13632
    Anh TranAnh Tran
    Keymaster

    Hi Toomas,

    Sorry for the problem. I'm happy to send you the refund. However, can you please give me a few days to check the incompatibility with CPT-onomies plugin and probably provide a fix for that?

    Also, would you please give the name of the plugin that has conflict with CPT-onomies? Since you bought a bundle, there are 12 plugins in there.

    Another thing, I think CPT-onomies is used for creating relationships between objects. So, why don't you use MB Relationships instead?

    Thanks
    Anh

    in reply to: Error with Image Advanced in Gutenberg #13611
    Anh TranAnh Tran
    Keymaster

    I'm still investigating in the bug. Will try my best to fix it earlier next week.

    in reply to: Field data (email) not showing on admin columns #13610
    Anh TranAnh Tran
    Keymaster

    Hi Marge,

    Also, is there a way to prevent repeat submissions based on email address?

    Do you mean if user submit a post that has an existing email in a custom field, then stop saving the post? As far as I know, there's no way to stop WordPress from creating a post (unless you use die).

    in reply to: rwmb_frontend_after_process set static value #13609
    Anh TranAnh Tran
    Keymaster

    Hi,

    If you use rwmb_frontend_after_process, then all the data are already processed. To assign a value to another field before it's processed, I think you need rwmb_frontend_before_process hook. Then you can modify the $_POST array to change the other field's value.

    in reply to: How To Style The Submit Form Button #13607
    Anh TranAnh Tran
    Keymaster

    Hi, there's an attribute edit for the shortcode. Please just add edit="true" to the shortcode and you'll see the post data after submitting. For details, please check the docs.

    in reply to: Auto populate not working for street_address field #13606
    Anh TranAnh Tran
    Keymaster

    Hi Annabelle,

    To make the address field auto completed, please set its ID starts with address, like address_one. The plugin checks for address prefix. For details, please see the docs.

    Update: Sorry, I misunderstood your question.

    Regarding the problem, I think the street_address is not available from the response for your entered address. It's rarely used and not always available.

    in reply to: By Post Field 'query args' with author #13605
    Anh TranAnh Tran
    Keymaster

    Do you mean query posts created by current user? Please clarify which user you want to set as author.

    in reply to: 500 Error after Checking Boxes in All in One Tab #13604
    Anh TranAnh Tran
    Keymaster

    Hi Jamie,

    Would you mind enabling the debug mode and see what's the error? We have tested the plugins with all recent WordPress versions and they work without any problem. Perhaps it's PHP version or some PHP extensions missing.

Viewing 15 posts - 1,321 through 1,335 (of 3,707 total)