conditional statement for a category
-
I have put in the following code and get an error
Parse error: syntax error, unexpected $end in xxxxxxx/wp-content/themes/simone-child/functions.php on line 22.<?php /* This file is part of a child theme called simone-child. Functions in this file will be loaded before the parent theme's functions. For more information, please read https://codex.ww.wp.xz.cn/Child_Themes. Add your own functions below this line. ========================================== */ // theme's functions.php or plugin file add_filter( 'if_menu_conditions', 'my_new_menu_conditions' ); function my_new_menu_conditions( $conditions ) { $conditions[] = array( 'name' => 'Schedule 2', //name of condition 'condition' => 'is_custom_category' //condition ; function is_custom_category() { return is_category('sched2'); } }
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘conditional statement for a category’ is closed to new replies.