New home › Forums › Gold Add-on › Add custom metabox in the list of points of interest
Tagged: custom metabox
- This topic has 7 replies, 4 voices, and was last updated 1 month ago by Matthew.
-
AuthorPosts
-
May 17, 2022 at 11:39 am #73126AndreamParticipant
Hello,
i want to add custom metaboxes to the plugin backoffice, is it possible to access through a hook to do this?Thanks
May 19, 2022 at 7:32 am #73134MatthewModeratorHi there,
Thank you for getting in touch with us, we do appreciate your time.
Please may I ask if you may confirm where specifically you would like to add custom metaboxes so that I may confirm if this is possible?
I look forward to your response.
Kindest Regards,
MatthewMay 20, 2022 at 3:32 pm #73144AndreamParticipantThanks for replying, i’d like to add the metabox under the title.
Thanks
May 23, 2022 at 10:49 am #73159MatthewModeratorHi again,
Thank you for your response and time on this, I really appreciate it!
Thank you for the confirmation, unfortunately there aren’t any hooks to add a custom metabox under the Title input in the marker panel.
However, you may add a custom input field under the “Title” input field by editing the core code of the plugin in the following file:
wp-google-maps\html\map-edit-page\marker-panel.html.php
Please note that as this would be a change in the core code, the change will be undone when the plugin is updated.
I hope this answers your question?
Kindest Regards,
MatthewJanuary 16, 2023 at 8:12 pm #76054loixiyoParticipantHi!
I have been checking the file marker-panel.html.php. The div for the categories is empty so I guess that the categories are injected later with Javascript. Where can I modify the HTML for the categories?
Kind regards.
January 17, 2023 at 1:10 pm #76059MatthewModeratorHi @loixiyo,
Thank you for getting in touch with us, we do appreciate your time.
As the Categories feature is a Pro feature, you may find the respective code in the Pro Add-on. The category-picker class handles loading the HTML for the categories, thus please see the below file:
\wp-google-maps-pro\includes\class.category-picker.php
Please do let me know if this helps?
Kindest Regards,
MatthewNovember 2, 2023 at 8:18 am #79088exad3545ParticipantHello,
I’ve taken a look at the file marker-panel.html.php, and I’ve noticed that the div element associated with categories appears to be empty. My assumption is that the categories are dynamically injected using JavaScript at a later point. Could you please point me in the right direction regarding how I can access and modify the HTML structure related to the categories?
November 2, 2023 at 10:37 am #79089MatthewModeratorHi there,
Thank you for getting in touch with us, we do appreciate your time.
The categories are placed into the marker editor panel is created with the Category Tree library.
Thus please may I stary by asking if you may confirm which WP Go Maps plugins you are using as well as their respective version numbers?
Could I also kindly ask you to confirm if you are receiving any errors within the JavaScript console while editing your map?
To view the JavaScript console, please see the steps below:
1. Navigate to the Map Editor (Maps -> Maps -> Edit).
2. Right-click on the page and click on ‘Inspect’ – This will open the Developer Tools window for your browser.
3. Locate the “Console” tab and click on it.
4. You should see the console area open with warnings listed in yellow and errors listed in red.
5. If possible, could I kindly ask you to please share a screenshot of any errors that are being displayed?I look forward to hearing back from you.
Kindest Regards,
Matthew- This reply was modified 1 month ago by Matthew.
-
AuthorPosts
- You must be logged in to reply to this topic.