Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 46 through 60 (of 174 total)
  • Author
    Posts
  • EddyPiVEddyPiV
    Participant

    Thanks Peter.

    You have a better memory than I...

    I managed to get it working.

    in reply to: Can the standard pagination bet set to 12 posts per page? #40703
    EddyPiVEddyPiV
    Participant

    Hi @Peter, yes that's what I meant. Thanks, works nicely!

    in reply to: Category Archive results in Page not found #40656
    EddyPiVEddyPiV
    Participant

    Peter, I took out the setting for the categoy, so that the default template would be used and not the view.
    Also 404 error.
    Changed to default WP theme, same issue.

    So nothing to do with MetaBox. Let's close this ticket, I'll contact my WP helpdesk.

    in reply to: Category Archive results in Page not found #40631
    EddyPiVEddyPiV
    Participant

    Peter, not sure you understood me.

    Archive and Search results are working fine. But the same settings are not working for the Categories.
    https://share.getcloudapp.com/v1uP5nYE

    It says "Page not found"

    in reply to: How to validate for forbidden words? #39706
    EddyPiVEddyPiV
    Participant

    Can this topic be marked as "open"?
    And can I pls get a response?

    Thanks.

    in reply to: How to validate for forbidden words? #39598
    EddyPiVEddyPiV
    Participant

    Peter,

    I understand the $GET['field_id1'] gets me the value of field1.
    My question is which variable to use in the function to apply the fieldname for which the remote validation is set up.
    In my case I have various fields that need to be checked for "forbidden-words" (and they are not called "field1")
    https://share.getcloudapp.com/JruyWOQB

    Apologies if I'm not using the proper vocabulary, but I expect you to try to understand a no-hardcore developer.

    Looking forward to your help.

    in reply to: How to validate for forbidden words? #39569
    EddyPiVEddyPiV
    Participant

    Hi, I see this topic is marked as resolved, but I hope to get an answer on my last question anyway.

    in reply to: How to validate for forbidden words? #39498
    EddyPiVEddyPiV
    Participant

    Peter, I'm struggling with the connection between validation rule set for the field and the action in functions.php, and back to the custom error message.

    The documentation mentions

    add_action( 'wp_ajax_my_action1', function () {
        // Get the field value via the global variable $_GET
        if ( $_GET['field_id1'] === 'something' ) {
            echo 'true'; // Valid
        } else {
            echo 'false'; // Invalid
            // or
            // echo 'This value is invalid, please try again.'; // Custom error message
        }
        die;
    } );

    How to replace the $GET['field_id1'], as the action is to be performed on the current field the validation is defined for.
    According to he reference you gave for the regex documentation (thanks for that!) the action should contain something like
    '$pattern = "/....|....|..../";
    echo preg_match($pattern, 'current field');'

    So to my understanding the if-else statement needs to be replaced by the echo statement, right? Then how to connect to the current field?

    in reply to: How to validate for forbidden words? #39496
    EddyPiVEddyPiV
    Participant

    Thanks Peter. I'll figure it out further. Looks good!

    in reply to: Bigger thumbnail for featured image of related post id #39495
    EddyPiVEddyPiV
    Participant

    Hi Peter, thanks a lot, that was helpful.

    in reply to: How to add a sidebar? #39475
    EddyPiVEddyPiV
    Participant

    I found that, thanks Peter

    in reply to: How to add a sidebar? #39382
    EddyPiVEddyPiV
    Participant

    I managed to get it to my liking.

    in reply to: Checkbox list values not shown #38900
    EddyPiVEddyPiV
    Participant

    I have sent the info you requested. Thanks for your help.

    in reply to: Checkbox list values not shown #38865
    EddyPiVEddyPiV
    Participant

    Hi Long,

    The code I gave you before is for listing all video's. That works through view type = shortcode.
    In another view the details of a video is shown (view type = singular), there the code works nicely.

    Back to your question, here is the code for the checkbox list field.

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'      => __( 'VideoDetails', 'your-text-domain' ),
            'id'         => 'videodetails',
            'post_types' => ['video'],
            'fields'     => [
                [
                    'name' => __( 'Keywords', 'your-text-domain' ),
                    'id'   => $prefix . 'keywords',
                    'type' => 'text',
                ],
                [
                    'name' => __( 'Length', 'your-text-domain' ),
                    'id'   => $prefix . 'length',
                    'type' => 'text',
                ],
                [
                    'name' => __( 'Trailer', 'your-text-domain' ),
                    'id'   => $prefix . 'trailer',
                    'type' => 'url',
                ],
                [
                    'name'            => __( 'Platform', 'your-text-domain' ),
                    'id'              => $prefix . 'platform',
                    'type'            => 'checkbox_list',
                    'options'         => [
                        'F'  => __( 'Fansly', 'your-text-domain' ),
                        'LF' => __( 'LoyalFans', 'your-text-domain' ),
                        'OF' => __( 'OnlyFans', 'your-text-domain' ),
                    ],
                    'std'             => true,
                    'inline'          => true,
                    'select_all_none' => true,
                ],
            ],
        ];
    
        return $meta_boxes;
    }
    EddyPiVEddyPiV
    Participant

    Long, works like a charm.

    Thanks a lot, completely to my liking now!

Viewing 15 posts - 46 through 60 (of 174 total)