add_filter hook
-
Hello!
I am very new to using hooks (new as in never done this before!). I have added a plugin by Curly Themes. I am using it for a client’s very large agenda. The layout of the agenda I want to use (Weekly Tabs) only displays the upcoming week. The developer provided an add_filter hook at the link below in section 8.2.6.https://docs.curlythemes.com/weekly-class-schedule/#free-support
I have created a child theme, created the folders and file as directed and placed the code in the file (customized to my needs). Unfortunately, all I get is the actual code displayed on the screen.
When I place the code in the PHP bracket the screen is just a white screen. I’m supposed to have this to the client this week and I am stumped! Any help/advice will be great. Below is the code I’m using:
add_filter( 'wcs_start', 'myy_custom_start_date', 30, 2 ); function myy_custom_start_date( $date, $options ){ if( intval( $options['id'] ) !== 3 ) return $date; return strtotime('10/17/2018'); } add_filter( 'wcs_stop', 'myy_custom_stop_date', 30, 2 ); function myy_custom_stop_date( $date, $options ){ if( intval( $options['id'] ) !== 3 ) return $date; return strtotime('10/22/2018'); }
- This topic was modified 6 years, 3 months ago by . Reason: code fixed
- This topic was modified 6 years, 3 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘add_filter hook’ is closed to new replies.