Skip Navigation

[Resolved] Using PHP to attach Hazard Product(CPT) posts to the Major Hazard(CPT) parent.

This support ticket is created 4 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 35 replies, has 3 voices.

Last updated by Luigi Bella 4 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1821493

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Luigi,

Not sure where you got the datepicker filter code from but it's not scoping correctly. Mainly it isn't targeting the view its meant to target.

Can you let me know where you got this code from as it may need adjusting to work correctly and not interfere with the view I created.

Thanks,
Shane

#1821555

Hi Shane,

The view id is listed in the code. I got the Toolset Supporter, Minesh, provided the code and can be found in the settings "Custom Code" tab named "toolset-custom-code."

Thank you.

#1826373

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Luigi,

Can you provide me with a link to the forum ticket that he provided this code to you in ?

I need a little context on it in order to see why it is not scoping correctly.

Thanks,
Shane

#1826393

Hi Shane,

Here's the link to the forum ticket: https://toolset.com/forums/topic/datepicker-not-filtering/

Thank you

#1827669

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Luigi,

So I checked on the code and activated it again and with the custom code for your date active the view that I created is working still even when the code is enabled.

I'm not sure what is happening but can you confirm everything is fine on your end ?

Thanks,
Shane

#1836903

Hi Shane,

The custom code doesn't work when it is activated. It only works when it has been added to your view code.

Thanks