• Resolved Kay

    (@kayhagueuniforum)


    Hi I’ve just read the article to creating a similar OTA site like Booking.com, and I must say, it was an incredible article, which led me to your plugin. I’ve been hunting for some similar guide and plugins for around a year now, messing around (and wasting money) on LOTS!

    One query though – I’d like to be able to create the exact same functions, but for a Routes website, displaying routes on a map. I’m currently using the CM Maps Route Manager plugin to create these routes, which works great EXCEPT there is no customisation over the look, search, and filter. I need mine to look like how Booking.com is, but for searching and displaying route pages. Could I achieve this with these plugins? Can I upload GPX/KML files to create the route, and display these and many others at the same time on a Google map (I have API keys)? Similar to how Booking.com displays all their hotel locations on their map, except individual Route pages would need to show their actual route on the map, done through the GPX/KML file upload I mentioned?

    Thank you for any further help you can offer! I’m literally a click away from purching the MetaBox bundle!! ??

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

    (@rilwis)

    Hi @kayhagueuniforum ,

    Thanks for your question.

    > I need mine to look like how Booking.com is, but for searching and displaying route pages.

    Our plugin doesn’t have search and filtering. But we have integrations for FacetWP, FilterWP which can help you to do that.

    > Can I upload GPX/KML files to create the route, and display these and many others at the same time on a Google map (I have API keys)

    I’m not sure about GPX/KML files. If they’re similar to Excel files, then you can try importing them using a plugin like WP All Import or WP CSV import.

    To show all the places on Google maps requires some coding. We have a tutorial for that, too.

    Thread Starter Kay

    (@kayhagueuniforum)

    Thank you for responding.

    OK, so if I wished to integrate the Meta Box custom fields into my own custom post type (not one created by Meta Box), how would I do this?

    Atm I am using the free online generator to create custom fields as a tester before purchasing the plugins. These fields show on a custom post type generated by Meta Box Custom Post Type, but not on my own custom post type, even though I’ve set the fields within .php to display within Posts, Pages, and Routes (the custom post type generated elsewhere).

    As I said, I am using another plugin to generate a custom post type, and it displays its own fields on the page editor. I have overridden this template within the theme directory and edited the editor.php file of that plugin. I’ve tried placing the Meta Box custom fields code into both my child functions.php file, and the child editor.php file for my the other plugin’s custom post type, but I can’t see the fields.

    Could you please help with this or explain the resolution?

    Thank you

    Thread Starter Kay

    (@kayhagueuniforum)

    I’ve looked further into this, but would still like an answer to my query above.

    What I’ve found is that I can create routes through the CM plugin, and then use their shortcodes in the MB Custom Post Type plugin to display the route data. However, I cannot see any meta box fields displayed at the front end (though they do display on the back end) with or without any of their shortcodes instilled (so I know it’s not an issue with CM’s shortcodes being on the page).

    Could you please advise why the selected field information isn’t displaying on the front end on my MB Custom Post Type, and only in the admin backend? What am I doing wrong? I don’t feel the documentation describes clearly enough what I do once I’ve created the custom fields and put them on the custom post type – how do I get the field data to display on the front end?

    I saw on this article (https://metabox.io/create-ota-website-with-meta-box-p1/?unapproved=1176&moderation-hash=22eadf59809f860c813faa6783488693#comment-1176) that in order for them to display the custom MB fields on their “Hotel page”, they created a single-hotel.php file in their child theme to overwrite the single.php file, and then mentioned something about using some code for content-single-hotel.php, but do not explain where or why you use this – they just provide the code. Could you please also explain what they mean by this – do I need to also create a content-single-hotel.php file in my child theme and input their code and change some details to suit my own needs in order to display the MB custom fields on the front end? If so, what? I don’t understand.

    Thank you

    Plugin Author Anh Tran

    (@rilwis)

    Hi @kayhagueuniforum

    > OK, so if I wished to integrate the Meta Box custom fields into my own custom post type (not one created by Meta Box), how would I do this?

    Yes, it’s possible. Please follow our docs. As you’re using Online Generator, in the parameter for “Post Types”, you need to modify the code to accept your actual post type. The Online Generator only supports “post” and “page”.

    > Could you please advise why the selected field information isn’t displaying on the front end on my MB Custom Post Type, and only in the admin backend? What am I doing wrong? I don’t feel the documentation describes clearly enough what I do once I’ve created the custom fields and put them on the custom post type – how do I get the field data to display on the front end?

    To display fields on the frontend, there are several approaches. Please follow this docs for details.

    Regarding the tutorial, it uses the method of using code to display fields which is explained in the docs above. The place where you put the code depends on your theme structure, it could be the file single.php, single-{$post_type}.php or content.php. WordPress has a very detailed docs on the theme structure here.

    Thread Starter Kay

    (@kayhagueuniforum)

    Thank you I will once again review the documents. I’ve been watching YT videos on displaying fields and reading articles and documents, but it doesn’t appear very clear and each contradicts the other – one document will say to place code in the functions.php, another says in the single-hotel.php (or whatever custom post type), MB Builder shows php code and says place that in the functions.php. I’ve reviews my theme’s code/functions and tried lots of ways and can’t seem to get it to work. When one document/article says to place X code in the functions and provides the code, I’m not sure where they got that code from in the first place to alter it for myself.

    Could you please answer this simple question –
    When created custom fields using MB Builder, do I just use the php code generator in the backend, and place that code in my functions file and that’s it? If not, what else? As I’ve said, I may just be being thick atm, but the documents don’t seem clear enough for me.

    Thank you

    Plugin Author Anh Tran

    (@rilwis)

    – The code to put in the functions.php is for registering fields.
    – The code to put in theme’s template files is for displaying fields.

    Regarding builder question: you better not copying the code from the builder to your theme’s functions.php file, unless you prefer to use code. Using builder helps you adding fields easier.

    If you prefer to use code, then you can copy the code from the builder to your theme’s functions.php file. Again, that code is for registering fields only.

    In any case, you still need to show fields on the front end. You can either do that by adding code in your theme’s template files as instructed in the tutorials, or use the MB Views extension.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Presales Query’ is closed to new replies.