Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • in reply to: Update hook #44501
    Régis EvennouRégis Evennou
    Participant

    I gave up with default wp post-type (post) and the default taxonomy (categories).
    I works fine with a CPT and custom Taxo 🙂

    in reply to: Update hook #44498
    Régis EvennouRégis Evennou
    Participant

    Sorry, i made a mistake 🙁
    i try to deal in frontend with default wp post-type (post) and the default taxonomy (categories).
    How to display the taxonomy (categories) in the frontend form ?
    I tried to add the taxonomy in a custom field, but it generates a field (independant of taxonomy 🙁
    An idea ?
    Thank you

    in reply to: Update hook #44496
    Régis EvennouRégis Evennou
    Participant

    Is there an another hook to use when the post is updated ?
    Thank you

    in reply to: Query variables to the URL #36321
    Régis EvennouRégis Evennou
    Participant

    Finally it works !
    I must be tired 🙂

    in reply to: Query variables to the URL #36311
    Régis EvennouRégis Evennou
    Participant

    Hi,
    Thank you for tips, i have already tried.
    I do not understand, it should be simple, i give up 🙁
    I will use a taxo instead.
    Have a nice day
    Régis

    in reply to: Image upload does not show Parent post information #34600
    Régis EvennouRégis Evennou
    Participant

    Hi,
    Thank you for your answer.
    I do not understand, maybe my explanations are not good 🙁

    My solution is to update the post (image) when the rwmb_frontend_after_process is activated.

    $arg = array('ID' => $media_id, 'post_parent' => $post_id,);
    wp_update_post( $arg );
    

    I wonder if this behaviour shoulb be automatic or if i have a bug in my code somewhere.

    Have a nice day !
    Régis

    in reply to: Revision and MB Frontend Submission #33748
    Régis EvennouRégis Evennou
    Participant

    Ok, thank you.

    in reply to: File Upload field do not show in admin Column #32180
    Régis EvennouRégis Evennou
    Participant

    Ok thx 🙂

    in reply to: File Upload field do not show in admin Column #32138
    Régis EvennouRégis Evennou
    Participant

    Hi,
    Here is the code.
    Thank you 🙂

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'      => __( 'Demande de résidence', 'your-text-domain' ),
            'id'         => 'cie-submit',
            'post_types' => ['espace-cie'],
            'fields'     => [
                [
                    'name' => __( 'Description du projet de résidence', 'your-text-domain' ),
                    'id'   => $prefix . 'description_du_projet_de_residence',
                    'type' => 'wysiwyg',
                ],
                [
                    'name'          => __( 'Nom de l\'auteur', 'your-text-domain' ),
                    'id'            => $prefix . 'nom_de_l\'auteur',
                    'type'          => 'text',
                    'desc'          => __( 'Le nom de l\'auteur du texte', 'your-text-domain' ),
                    'admin_columns' => 'after discipline_artistique',
                ],
                [
                    'name' => __( 'Distribution / Equipe', 'your-text-domain' ),
                    'id'   => $prefix . 'distribution_equipe',
                    'type' => 'wysiwyg',
                ],
                [
                    'name'          => __( 'Période souhaitée', 'your-text-domain' ),
                    'id'            => $prefix . 'periode_souhaitee',
                    'type'          => 'text',
                    'admin_columns' => 'after partenaires_du_projet',
                ],
                [
                    'name'          => __( 'Discipline artistique', 'your-text-domain' ),
                    'id'            => $prefix . 'discipline_artistique',
                    'type'          => 'text',
                    'admin_columns' => 'after title',
                ],
                [
                    'name'          => __( 'Image', 'your-text-domain' ),
                    'id'            => $prefix . 'artiste_image',
                    'type'          => 'image',
                    'admin_columns' => 'after title',
                ],
                [
                    'name' => __( 'Partenaires du projet', 'your-text-domain' ),
                    'id'   => $prefix . 'partenaires_du_projet',
                    'type' => 'wysiwyg',
                ],
                [
                    'id'                => $prefix . 'hidden_cie_name',
                    'type'              => 'hidden',
                    'admin_columns'     => [
                        'position'   => 'after title',
                        'title'      => 'Nom de la cie',
                        'sort'       => true,
                        'searchable' => true,
                        'filterable' => true,
                    ],
                    'sanitize_callback' => 'nom_de_la_cie',
                ],
                [
                    'name'          => __( 'File Upload ok', 'your-text-domain' ),
                    'id'            => $prefix . 'file_upload_ok',
                    'type'          => 'file_upload',
                    'admin_columns' => [
                        'position' => 'after artiste_image',
                        'title'    => 'Dossier',
                    ],
                ],
            ],
        ];
    
        return $meta_boxes;
    }

    ---- AFTER -------------------------------

    <?php
    add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' );
    
    function your_prefix_function_name( $meta_boxes ) {
        $prefix = '';
    
        $meta_boxes[] = [
            'title'      => __( 'Demande de résidence', 'your-text-domain' ),
            'id'         => 'cie-submit',
            'post_types' => ['espace-cie'],
            'fields'     => [
                [
                    'name' => __( 'Description du projet de résidence', 'your-text-domain' ),
                    'id'   => $prefix . 'description_du_projet_de_residence',
                    'type' => 'wysiwyg',
                ],
                [
                    'name'          => __( 'File Upload ok', 'your-text-domain' ),
                    'id'            => $prefix . 'file_upload_ok',
                    'type'          => 'file_upload',
                    'admin_columns' => [
                        'position' => 'after artiste_image',
                        'title'    => 'Dossier',
                    ],
                ],
                [
                    'name'          => __( 'Nom de l\'auteur', 'your-text-domain' ),
                    'id'            => $prefix . 'nom_de_l\'auteur',
                    'type'          => 'text',
                    'desc'          => __( 'Le nom de l\'auteur du texte', 'your-text-domain' ),
                    'admin_columns' => 'after discipline_artistique',
                ],
                [
                    'name' => __( 'Distribution / Equipe', 'your-text-domain' ),
                    'id'   => $prefix . 'distribution_equipe',
                    'type' => 'wysiwyg',
                ],
                [
                    'name'          => __( 'Période souhaitée', 'your-text-domain' ),
                    'id'            => $prefix . 'periode_souhaitee',
                    'type'          => 'text',
                    'admin_columns' => 'after partenaires_du_projet',
                ],
                [
                    'name'          => __( 'Discipline artistique', 'your-text-domain' ),
                    'id'            => $prefix . 'discipline_artistique',
                    'type'          => 'text',
                    'admin_columns' => 'after title',
                ],
                [
                    'name'          => __( 'Image', 'your-text-domain' ),
                    'id'            => $prefix . 'artiste_image',
                    'type'          => 'image',
                    'admin_columns' => 'after title',
                ],
                [
                    'name' => __( 'Partenaires du projet', 'your-text-domain' ),
                    'id'   => $prefix . 'partenaires_du_projet',
                    'type' => 'wysiwyg',
                ],
                [
                    'id'                => $prefix . 'hidden_cie_name',
                    'type'              => 'hidden',
                    'admin_columns'     => [
                        'position'   => 'after title',
                        'title'      => 'Nom de la cie',
                        'sort'       => true,
                        'searchable' => true,
                        'filterable' => true,
                    ],
                    'sanitize_callback' => 'nom_de_la_cie',
                ],
            ],
        ];
    
        return $meta_boxes;
    }
    in reply to: Searchable option #31544
    Régis EvennouRégis Evennou
    Participant

    Hi,
    Thank you for your answer.
    I will use Better Admin Users Search plugin to extend search to users.

    in reply to: Copy some sub fields in group with polylang #28153
    Régis EvennouRégis Evennou
    Participant

    I will try.
    Thank you

    in reply to: MB view by shortcode #28130
    Régis EvennouRégis Evennou
    Participant

    I will study taht 🙂
    Thank you

    in reply to: MB view by shortcode #28111
    Régis EvennouRégis Evennou
    Participant

    Ok, it works for me now 🙂

    <div class="markets">    
        {% set args = {post_type: 'market', posts_per_page: -1} %}
        {% set posts = mb.get_posts( args ) %}
        {% for post in posts %} 
            {# Image #}
            {% set image = mb.rwmb_meta( 'logo_market', '', post.ID ) %}
            <img src="{{ image['full_url'] }} "> 
        {% endfor %}    
    </div>

    I do not understand why i can not use mb view UI to insert this {{ post.logo_market.thumbnail.url }}...
    Someone can explain ?
    Thank you

    in reply to: MB view by shortcode #28100
    Régis EvennouRégis Evennou
    Participant

    Ok, i can display the text field (text_test) 🙂
    But not the image (logo_markey) 🙁

    <div class="markets">    
        {% set args = {post_type: 'market', posts_per_page: -1} %}
        {% set posts = mb.get_posts( args ) %}
    
        {% for post in posts %} 
    
            {# Text #}
            {{ post.text_test }}
    
            {# Image #}
            <img src="{{ post.logo_markey.full.url }}">
    
        {% endfor %}    
    </div>
    in reply to: MB view by shortcode #28099
    Régis EvennouRégis Evennou
    Participant

    i tried this, it should work ?

    <div class="markets">
        {% set args = {post_type: "market", posts_per_page: 3} %}
        {% set posts = mb.get_posts( args ) %}
        {% for post in posts %}
            {{ post.title }}
        {% endfor %}
    </div>
Viewing 15 posts - 1 through 15 (of 15 total)