Forum Replies Created
-
AuthorPosts
-
Régis Evennou
ParticipantI gave up with default wp post-type (post) and the default taxonomy (categories).
I works fine with a CPT and custom Taxo 🙂Régis Evennou
ParticipantSorry, 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 youRégis Evennou
ParticipantIs there an another hook to use when the post is updated ?
Thank youRégis Evennou
ParticipantFinally it works !
I must be tired 🙂Régis Evennou
ParticipantHi,
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égisRégis Evennou
ParticipantHi,
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égisRégis Evennou
ParticipantOk, thank you.
Régis Evennou
ParticipantOk thx 🙂
Régis Evennou
ParticipantHi,
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; }Régis Evennou
ParticipantHi,
Thank you for your answer.
I will use Better Admin Users Search plugin to extend search to users.Régis Evennou
ParticipantI will try.
Thank youRégis Evennou
ParticipantI will study taht 🙂
Thank youRégis Evennou
ParticipantOk, 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 youRégis Evennou
ParticipantOk, 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>Régis Evennou
Participanti 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> -
AuthorPosts