We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Implement button clicks in the built-in WordPress editor – Verge3D Plugin

Home Forums General Questions Implement button clicks in the built-in WordPress editor – Verge3D Plugin

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #79705
    calbrecht
    Customer

    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!

    #79711

    Hi,
    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.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #79715
    calbrecht
    Customer

    Hi 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
    Cris

    Attachments:
    You must be logged in to view attached files.
    #79721

    You 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.

    Soft8Soft Tech Chief
    X | FB | LinkedIn

    #79739
    calbrecht
    Customer

    Thank you, I will review all that.
    Cris

    #79740
    calbrecht
    Customer

    Alexander,
    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
    Cris :good:

    #79758

    Thank you for bringing this up. We’ve already uploaded the fix to WordPress repository :good:

    Soft8Soft Tech Chief
    X | FB | LinkedIn

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.