codyhouse/codyhouse-framework

Framework added from within WP plugin not working ...

sanzwebdevelopment opened this issue · 2 comments

Hey Codyhouse Crew ... love the framework and the components :-)

Wanting to use certain components on a client site so have created a basic plugin to add the scripts/styles etc rather than adding to the child theme.

I selected all the components I wanted, modified the globals and then exported the project from within our my account on codyhouse.co. Then added the files across to my plugin folder and ran the install etc.

From the front end the components look good ie styles are loading etc ... just can't figure out why I can't get for instance the date range component (or others) to actually work as intended ie clicking the "Select dates" button does not fire the calendar dropdown. Have also added the number input component and again that looks good, but doesn't seem to want to work ie clicking the increment arrows don't change the values.

All scripts and styles are being loaded on the front end (no 404s) and no errors in the console. I deactivated ALL other plugins to see if another plugin was interfering but still same issue.

Not sure what is going on. Hoping I've overlooked something simple. I'd be much appreciative if by chance you can have a look at here and see if you can see something wrong?

Trying to create a property search/filtering component with a horizontal search bar with date range, guests, pets toggle etc with the listing cards underneath ... sort of like the Filter component, but more suited to accommodation booking ;-) (will submit a component when I get a chance).

Thanks so much :-)

Scott

Hi Scott,
from what you said, it looks like the JS code of the component is not imported correctly. So I would suggest to double-check the plugin you are using the import the components in your Wordpress theme. Always make sure the JS code is imported in the footer of your page. Cheers!

Hey thanks so much for the reply @claudia-romano :-)

I ended up adding the main Codyhouse script to the footer as suggested and that worked perfectly! It didn't occur to me to do that so thanks for the reminder.

Cheers again.
Scott