Support Forum » User Profile

Forum Replies Created

Viewing 15 posts - 16 through 30 (of 51 total)
  • Author
    Posts
  • in reply to: Group Field just stopped working #41538
    AnLipAnLip
    Participant
    in reply to: Group Field just stopped working #41537
    AnLipAnLip
    Participant

    Even stranger : when I try to change the status of the GF it just refuses to accept any modifications :

    - Published > Draft > Save doesn't work (changes are not taken in account)
    - Settings > Location > "Projet" (changes are not taken in account)

    It's as if the Group Field has become corrupt after simply adding a new field... (I actually cloned an exisiting Text field and renamed it as well as the ID).

    in reply to: MENU POSITION just doesn't work... #41064
    AnLipAnLip
    Participant

    Hello, thank you for getting back to me.

    Menu order is secondary to all other priorities such as the choice of theme (Bricks), and the necessary plugins (nothing fancy), so I cannot have as a solution to deactivate or change my themes/plugins.

    If MB ambitions to offer the possibility to change menu orders, I think it is up to MB to check that their function is compatible with other most important plugins and themes. The installed plugins in my install are nothing fancy and none of them have any function to move menu order around, so why would it conflict with what MB is set to achieve ? They only just place themselves in the menu (usually at the bottom, except for Bricks that takes a top-level position). And as shown in my loom video, it works, until at some point the items get mixed up... sorry, but it feels like the issue is coming from MB. Could you please check on your test site making sure a few common plugins are installed ?

    Below my plugin list (+ Bricks theme)
    - All in One Migration + FTP extension
    - Automatic.css
    - BricksExtras
    - Font Hero
    - HappyFiles Pro
    - Meta Box
    - Meta Box AIO
    - motion.page
    - Plaster
    - WordPress Importer
    - WP Grid Builder
    - WP Grid Builder - Bricks
    - WP Grid Builder - Meta Box
    - WPCodeBox

    in reply to: Using custom fields with Media Attachment #40566
    AnLipAnLip
    Participant

    This is much appreciated. I hope it leads to something nice. Thank you Peter.

    in reply to: Using custom fields with Media Attachment #40533
    AnLipAnLip
    Participant

    If the compatibility of MetaBox was developed in regards to using all of its functionalities with the WP Media Attachments, it would be really great !
    The Media Library could then be used as a much more powerful tool to group attachments (in my case mainly interested in images/photos), create sub-groups, query them, classify them using taxonomies, display them as unique elements in the frontend while pulling their own data.
    And for the admin of the website, it would be great to be able to use the Media modal or whatever other screen to easily add metadata.
    I am aware that some of these functions are already working, but they are still far from being perfect.
    I really hope you can spend some time trying to figure out a way to do so, or maybe develop an new extension for this purpose. Thanks for letting us know if you are working on it. Cheers

    in reply to: Using custom fields with Media Attachment #40513
    AnLipAnLip
    Participant

    Loom video to understand what is going on : https://www.loom.com/share/656e2cfdfe3d416dbea10586f9fd1c33

    in reply to: MB Taxonomies not available #40426
    AnLipAnLip
    Participant

    OK, seems like a hard refresh worked. i have no idea why there was no access possible, it is visible in the screen recording... but now it loads fine. Mysteries of computer science.

    in reply to: Attach the uploaded media file to the post #39831
    AnLipAnLip
    Participant

    Hi,

    Well, as of yesterday, it did not work. The Media Attachment is not attached to the current post it is uploaded to. At least, it does not show as attached to when displaying Media Library (in WP backend) as a list, where it should.

    using the snippet I provided above, it does work nicely. But if the Media Attachment is removed from the custom field (Advanced Images), it does unfortunately not update the attachment to the post (by removing it).

    There is still work to be done, hope MB can implement this all the way.

    in reply to: Attach the uploaded media file to the post #39812
    AnLipAnLip
    Participant

    I have found a code to automatically update media attachment to be attached to the current post it was uploaded to :

    <?php
    
    add_action('save_post', 'update_image_data');
    
    function update_image_data($post_id){
        $images = get_post_meta($post_id, 'mg_projet_galerie_images', true);
        if(!empty($images)){
            foreach($images as $image){
                wp_update_post(array('ID' => $image, 'post_parent' => $post_id));
            }
        }
    }
    ?>

    It would be nice to have this feature natively. For example, in Bricks Builder you could query the medias attached to the current post this way : https://academy.bricksbuilder.io/article/query-loop/#media-query
    At the moment, if medias are not attached to the post, then you can not query them without adding more custom code such as this one (it was given to me by Bricks support - replace with your own ID and custom field names) :

    <?php 
    
    add_filter( 'bricks/posts/query_vars', function( $query_vars, $settings, $element_id ) {
    
        if ( $element_id !== 'yeamho') return $query_vars;
            
        $gallery_images = (array) rwmb_meta( 'mg_projet_galerie_images', ['size' => 'full'] );
        $gallery_images_ids = array_keys($gallery_images);
        
        // if no gallery images, set empty string array
        $gallery_images_ids = count($gallery_images_ids) > 0 ? $gallery_images_ids : [''];
        
        $query_vars['post__in'] = $gallery_images_ids;
    
        return $query_vars;
    }, 10, 3 );
    ?>
    in reply to: Fatal error Meta Box AIO. #39779
    AnLipAnLip
    Participant

    Strangely, this does not fix the problem for me. I keep having a fatal error WP message when trying to access existing Taxonomy setting pages.

    in reply to: MB View - Gridbuilder Card #39554
    AnLipAnLip
    Participant

    Hi,

    Please find links to screen captures.

    At the moment I am using the MB View shortcode in a block in WP GridBuilder and get the same results whether I use :
    - [mbv name="wpgb-card-meta" post_id="{{ post.id }}"]
    - [mbv name="wpgb-card-meta"]
    It shows the same values on every post (instead of each card having it's own values).

    https://pasteboard.co/6QhYX3PLrms8.png
    https://pasteboard.co/AuH393fu1DEk.png
    https://pasteboard.co/omqNIskAbXVC.png

    Hope you can help me understand how to fetch the values of each post.

    in reply to: MB View - Gridbuilder Card #39463
    AnLipAnLip
    Participant

    Hi Peter, thank you for looking into this.

    Sorry but doing it this way breaks the site display. If I place the code you gave me in the View (and replace the "custom_field_id" by my custom field ID), it messes up the grid on the frontend, something is wrong with the code, or I don't have enough information as to what has to go where exactly.

    I will try to be precise in what I have now :
    - View Template = {{ mb.rwmb_meta( 'mg_projet_localisation', '', post_id }}
    nothing else than that is written in the View Template. Should it be wrapped into something such as a <div> ?. The shortcode for this view is [mbv name="wpgb-card-meta"]

    - Custom code loaded with snippet plugin (WpCodeBox) that creates a custom block using the View shortcode :

    <?php
    function register_custom_field_email_block($blocks)
    {
        // "custom_field_email_block" corresponds to the block slug.
        $blocks["custom_field_email_block"] = [
            "name" => "MG - Infos Projet",
            "render_callback" => "render_custom_field_email_block",
        ];
    
        return $blocks;
    }
    add_filter("wp_grid_builder/blocks", "register_custom_field_email_block");
    
    function render_custom_field_email_block() {
    	// Object can be a post, term or user.
    	$object = wpgb_get_object();
    
    	// If this is not a post (you may change this condition for user or term).
    	if ( ! isset( $object->post_type ) ) {
    		return;
    	}
    	// You have to change "custom_field_name" by yours.
    	echo do_shortcode('[mbv name="wpgb-card-meta" post_id='. $object->ID .']'); //pass the ID from object above
    }

    - Second option to show the content of the View template : in WP GridBuilder I use a normal content block and set it to "custom content" and paste the shortcode in the raw HTML field : [mbv name="wpgb-card-meta"]

    Both options give me the same result (according to the steps since I opened this thread) : either nothing (only the simple text, not the custom fields), either only the post ID, either it breaks the layout. It never has outputted any data from the custom fields.

    in reply to: MB View - Gridbuilder Card #39438
    AnLipAnLip
    Participant

    Hi. Thanks for your answer.

    I am not sure what you mean by : "1. View code: just print out the post ID"

    Post ID: {{ post_id }}

    ? What do I do with this piece of code ? Do I replace all my View code and leave only this ? If so, it prints "Post ID : 1234", but I do not want to see it on the frontend. And it does not make the data from the custom fields appear on the card, I still only get the inter-text.

    in reply to: MB View - Gridbuilder Card #39423
    AnLipAnLip
    Participant

    Hi.
    Not sure what you mean, but if you could give me a code to test i will definitely do it.

    This is the MB View code I use in the Template part :

    <div>
    {% for item in post.mg_projet_type %}
    	{{ item.name }}
    {% endfor %} de {{ post.mg_projet_surface }}m2, à {{ post.mg_projet_localisation }}</div>

    This is the shortcode the way I use it (once in a WPGB custom block with code written above, and once in a native raw content block (HTML) from WPGB :
    [mbv name="wpgb-card-meta" post_id="{{ post.id }}"]

    in reply to: Dynamic Shortcode #39404
    AnLipAnLip
    Participant

    Hi.
    Can't help but to duplicate my demand from https://support.metabox.io/topic/mb-view-gridbuilder-card/ to here since it implies roughly the same thing : using dynamic data in a shortcode.
    So I'm trying to use a MB View shortcode to display a View in a WP GridBuilder card. I was told I need to pull the post's ID to make it work, but it doesn't at the moment.

    Here is the shortcode as I have it : [mbv name="wpgb-card-meta" post_id="{{ post.id }}"]

Viewing 15 posts - 16 through 30 (of 51 total)