• Resolved GardeCan

    (@makkie65)


    Hello,

    First of all, I am NOT a coder, but I am willing to edit files given instructions. With that said, I am working with a theme that uses Meta Box as field creation tool. It comes inside a functionality plugin provided by the theme. It also comes with the following Meta Box extensions: term meta, builder, columns, conditional logic, group, show hide and tabs. Apparently, they also used Meta Box to create their own field builder and here is where my problem comes in; they only have 3 field types (text, text area and select), no other types of fields nor conditional logic. I was able to identify their field builder file, but can’t make heads or tails of it (not being a coder and all). I know that there must be a way to replace their field builder with Meta Box’s field builder so it registers the added fields in the same manner as if they were added with their field builder, but now with all the advantages of the 40+ field types and the use of the included conditional logic extension. My question is: Can anybody point me in the right direction on how to implement this? I can post the code to that field builder file if it will help. And YES, I already asked the theme developer, but got no response. Thank you in advance.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Anh Tran

    (@rilwis)

    Hi @makkie65,

    If I understand correctly, you’re trying to modify custom fields created by the theme, aren’t you?

    If yes, it’s best to modify the code in the theme where fields are registered. It requires some coding, though.

    You can also add new fields using our Online Generator, and copy the generated code into your theme’s functions.php file. However, to modify existing fields, you have to edit the theme file.

    Thread Starter GardeCan

    (@makkie65)

    Hi @rilwis

    First of all, thank you for your response. You got HALF of my question. I know about your code generator, but the theme already has your meta box builder, however for some reason they do NOT have it activated within the theme. I already tried adding the code from your field builder to the pseudo-functions.php, but it didn’t work because they have MANY functions.php files all over. For example, they have their basic fields created with Meta Box in a file called themename-meta-boxes.php and from what I was able to see, for EACH field they have code in 6 or 7 files and in one file in 4 or 5 instances. I need to add over 80 fields, can you imagine adding each fields manually to all those files? I thought that making YOUR field builder work within THEIR field builder would be the saner approach, don’t you think? I just need the required code to hook their field builder with yours because their field builder automatically adds the fields to the details part of the listings form and listings page (it’s NOT ideal, but better than nothing). Like I said, I can post the code from their field builder file if it will help. Thank you again.

    • This reply was modified 4 years, 6 months ago by GardeCan.
    Thread Starter GardeCan

    (@makkie65)

    A side note:

    It would be AWESOME if you had a calculated field type. It is VERY important for a lot of listings site. For example to calculate price per square foot and many others!!! Anyways, thanks again

    Thread Starter GardeCan

    (@makkie65)

    Any chance of a solution for this? Thanks

    Plugin Author Anh Tran

    (@rilwis)

    Hi @makkie65,

    If the theme already includes Meta Box Builder, you can enable the extension by including the main PHP file of the extension, or you can ask the theme author to do that for you.

    However, the Meta Box Builder won’t be able to fetch all existing fields that are registered in your theme. So, if you still need to modify the existing fields in the theme, you have to edit the theme files. There’s no other ways.

    Thread Starter GardeCan

    (@makkie65)

    So, this is my situation:

    I am working with a listings theme that has a “fixed” submit listing form in the FRONT END (i.e. once you set it up it can’t be changed). And we all know that a vehicle listing requires DIFFERENT information than a house listing (i.e. a car doesn’t have bedrooms and a house doesn’t have a transmission), so I have been going crazy trying to get a submit listing form with conditional logic to work with this theme. I’ve tried formidable forms, Piotnet addons for elementor, I even tried YOUR Meta Box integrator for elementor together with Piotnet to creates a submit form, but for some reason that I cannot figure out, any field entry created with these tools outside of title and content are NOT passed Through. To test, for example, I picked the price field that comes with the theme from the dynamic meta box post field in elementor and it does NOT pass through which is strange since the theme was created using Meta Box.

    The theme author seems to think that his submit form is fine the way it is. He’s OK with a car having bedrooms and a house having a transmission.

    Any direction on how I can get this to work will be MUCH appreciated. Thank you.

    Plugin Author Anh Tran

    (@rilwis)

    Hi @makkie65,

    As I understand, you’re trying to modify the submit form that are created by the theme author with PHP files, aren’t you?

    In this case, the best way is modifying those PHP files directly. The Meta Box Builder extension can’t fetch the data from PHP files and let you modify them visually, so it can’t help you.

    Thread Starter GardeCan

    (@makkie65)

    Hi @rilwis

    Ok, I understand and I am back to square one. Inserting the generated php into the functions.php file does nothing in this theme. I guess there’s more that needs to be done in order for the theme to see the new fields. I’m attacking this problem from all possible directions, but always end up in the same spot. Thanks for trying to help.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Implement Meta Box Builder in my theme’ is closed to new replies.