Home › Forums › General Questions › Implement button clicks in the built-in WordPress editor – Verge3D Plugin
- This topic has 6 replies, 2 voices, and was last updated 1 week, 5 days ago by Alexander Kovelenov.
-
AuthorPosts
-
2025-01-07 at 11:57 pm #79705calbrechtCustomer
Hi,
I have installed the Verge3D WordPress plugin and followed the example on the installation guide you have. I have created a very simple example where when the button on the wordpress page is clicked the Cube object in the 3D scene hides. The scene loads on the page, thats ok.
But unfortunately it looks like the click event isn’t working for some reason.
I don’t know what I’m missing.I have all set exactly as described in the https://www.soft8soft.com/docs/manual/en/introduction/Wordpress-Plugin.html#installation
Besides the event puzzle is there anything else that needs to be set or created in the verge project? anything to be added in the project.js?
Thanks for the help!
2025-01-08 at 10:31 am #79711Alexander KovelenovStaffHi,
There are no specific puzzles required for making it work. The most probable cause of this misbehavior might be specifying a wrong value for the “query selector” puzzle, hence it does not return anything. You might use the print to console puzzle to verify that the proper element is returned by the query selector.2025-01-09 at 3:43 am #79715calbrechtCustomerHi Alexander,
Thanks for the quick reply. I’ve created a simple pulldown using the ‘code’ option and not using the block type button with an ID and used the element ID & values in the query selector in the puzzle and that works just fine so I suspect that there is something related with the class itself.
I have followed the example and in the Additional CSS class(es) I added the class my-button, then in the query selector I entered my-button a as the instructions and that does not work. It can’t find that element.On another note, have been getting an error when uploading the Verge project (files) using the plugin. You can see the screenshot attached. I appreciate your guidance / comments on that. Thanks
CrisAttachments:
You must be logged in to view attached files.2025-01-09 at 5:57 am #79721Alexander KovelenovStaffYou might try using the Chrome Developer Tools to find that element and get it by its class… etc manually, by executing the
document.querySelector(" ... ")
right in the browser console.Regarding the upload fail, apparently there is one file that has invalid MIME type (extension). You might need to review your app folder to find it and add its MIME to the plugin settings.
2025-01-09 at 3:04 pm #79739calbrechtCustomerThank you, I will review all that.
Cris2025-01-09 at 3:33 pm #79740calbrechtCustomerAlexander,
The issue with the files upload was related to the application/x-apple-ds-store ds_store hidden file.
On a Mac, the mime type for a “.DS_Store” file is typically not officially defined, as it’s a system file used by the Finder to store metadata about a folder’s appearance (like icon positions and view options), and is considered a hidden file, meaning it doesn’t usually have a designated mime type; however, some systems might identify it as “application/x-apple-ds-store” if needed to handle it specifically.Thanks
Cris2025-01-10 at 6:34 am #79758Alexander KovelenovStaff -
AuthorPosts
- You must be logged in to reply to this topic.