Support Forum ยป User Profile

Forum Replies Created

Viewing 14 posts - 16 through 29 (of 29 total)
  • Author
    Posts
  • HenriHenri
    Participant

    Hi Long,

    I've just got the message on Facebook of a new tutorial on Youtube: https://metabox.io/move-custom-fields-data-to-custom-tables/#more-26926

    What a coincidence ๐Ÿ™‚ Thanks for this nice tutorial.

    I've used the 'Save data in a custom table' and 'Create table automatically' features of the Builder to create the custom table. After created I changed the field types in the table via PHPmyAdmin, because all fields were Text type. Is that okay to do or might that cause problems if I change the field types this way in the database?

    Kind regards, Henri

    HenriHenri
    Participant

    Hi Long,

    Thanks for researching this. It worked ๐Ÿ™‚

    I've copied your code to the function.php file in the child theme. Is it also possible to do this in the MB view editor? Or do you really need this php code? In other words, can this be translated to the MB View editor syntax?

    Anyway, awesome that you solved this and I'll definitely keep this code example close, so I can use it in my projects. Kudos for the great support you are delivering ๐Ÿ™‚

    Henri

    HenriHenri
    Participant

    Hi Long,

    I've created the custom posts types, like described in the MB relationship article: https://docs.metabox.io/extensions/mb-relationships/#multiple-relationships

    I've added the 3 custom post types: artist, event, band and I've connected them with MB relationships. I've added a function in the child function.php theme as follows:

    function relatedposts(){
        $query = new WP_Query( [
        'relationship' => [
            'relation' => 'OR',
            [
                'id'   => 'events_to_bands',
                'from' => get_the_ID(),
            ],
            [
                'id'   => 'events_to_artists',
                'from' => get_the_ID(),
            ],
        ],
        'nopaging'     => true,
    ] );
    while ( $query->have_posts() ) {
        $query->the_post();
        echo get_the_title() . '<br>';
    }
    wp_reset_postdata();
    }

    Now I'm trying to call this in my MB View 'Artist' like so:
    {% mb.relatedposts() %}

    Nothing shows. I do have 1 artist connected with one event and the event is connected to 1 band. So when I'm displaying an artist, I want to show the event he is connected to and the bands that are connected to that event. But somehow the above code doesn't work. Can you help me?

    Kind regards, henri

    HenriHenri
    Participant

    Hi Long,

    so I can't do it just in the template tab on the MB View Edit View page on the backend of WordPress?

    Can you point me to some beginner articles how to create php functions for Metabox implementation? I'm really new at coding and I'm kinda in the dark. So if you have some great blogposts of Metabox you can point me to, I would be very grateful ๐Ÿ™‚

    Kind regards, Henri

    in reply to: โœ…Custom fields not showing in 'Insert Field' list #26628
    HenriHenri
    Participant

    Hi Long,

    Thanks, I just send them the message. I'll let you know if that will solve it.

    Kind regards, henri

    in reply to: โœ…Custom fields not showing in 'Insert Field' list #26617
    HenriHenri
    Participant

    Hi Long,

    I think I found the issue. I'm using WPVivid plugin to create a staging site. The staging website has the same setup as the main website, so the same plugins. If I install a fresh WordPresss instance and only add the WPVivid plugin, you will only see that in the staging website. So there shouldn't be anything different form a clean WordPress install.

    However, when I install MB views on the staging website, it doesn't show the custom fields (after I set those up ofcourse). But when I do the same on the main website, it does show the custom fields.

    So it has something to do with the staging website I've created via WPVivid, but what I don't know. I'm using the same database as the main website, as this is recommended. See: https://wpvivid.com/wpvivid-backup-pro-create-staging-site

    Do you know what it could be?

    And do you know what I could otherwise do? I'm creating a staging site so I can develop the website. If I can't use it with Metabox, I need to find another solution to safely develop a website while leaving the production website untouched.

    Kind regards, Henri

    in reply to: โœ…Custom fields not showing in 'Insert Field' list #26612
    HenriHenri
    Participant

    Hi Long,

    did you find anything why the custom post fields are not showing even on the fresh wordpress staging installation?

    Kind regards, Henri

    HenriHenri
    Participant

    Hi Long,

    Thanks for pointing that out. That issue is solved then ๐Ÿ˜Š

    Kind regards, Henri

    in reply to: โœ…Custom fields not showing in 'Insert Field' list #26563
    HenriHenri
    Participant

    Hi Long,

    I didn't see that before. I tried to see what's wrong, but I couldn't, so I decided to create a fresh staging site. The rest API error is gone now. I've installed everything fresh again. But the custom fields still don't show in the Insert Field option. See my new recording: https://share.getcloudapp.com/yAu6pd0R

    I do get it to work to just type in the custom field name, like this {{ post.business }}. But I would rather have it shown to just pick the values.

    I've recreated the credentials, so you can login to the new staging site with the same credentials.

    Kind regards, Henri

    in reply to: โœ…Custom fields not showing in 'Insert Field' list #26552
    HenriHenri
    Participant

    Hi Long,

    I've installed the latest WordPress theme and the latest Metabox plugins. I also disabled the other plugin. So it should be a clean installation on WP5.7. I tried it again, but the custom fields are still not showing. However, it also has some strange behavior of showing the terms and then removing them again because there is a tab for that as well. I have recorded the issue again: https://share.getcloudapp.com/ApuR7WBk

    I'll supply the credentials via the form.

    Kind regards, Henri

    HenriHenri
    Participant

    Hi Long,

    Thanks for the quick reply. I've disabled my current Kadence theme and disabled the plugin of WpVivid staging. The only plugins active are now of Metabox. And I'm running the latest WordPress install 5.7.

    I did the test again, and although now it works better with the Editor option disabled. However, when I enable it, it still not works as expected. It still doesn't show some fields. See the recording: https://share.getcloudapp.com/geu46D6b

    I'll check my other MB view issue and will get back to you on that too.

    Kind regards, Henri

    in reply to: โœ…'Menu position after' doesn't work #26541
    HenriHenri
    Participant

    Thanks Long, for the quick reply. Good to hear.

    Kind regards, Henri

    in reply to: โœ…No support for spaces in text? #22229
    HenriHenri
    Participant

    Hi Long Nguyen,

    Thanks for checking the issue and your suggestions. I'll take a look if I can solve it that way. I'll also try on a clean installation first.

    Kind regards,

    Henri

    in reply to: โœ…Display multiple media files connected to a user #22217
    HenriHenri
    Participant

    Hi Long Nguyen,

    Awesome, it works like a charm now. I finally found a way to do what I want with your plugin ๐Ÿ˜Š I've tried it with Pods and with ACF in combination with Beaver Themer and it didn't work. Now I'm able to it with just Metabox. Awesome ๐Ÿ‘๐Ÿป

    Kind regards, Henri

Viewing 14 posts - 16 through 29 (of 29 total)