Help me with Query_Var
-
Help me please.
I create two query_var but I have not idea for this. because this isn’t working. pq-modem.php is for general category, pq-modem2.php is for specific category.
I know this case will done by using conditional if query based on category. But the problem is I don’t know how to do it.
This the code I use until now.function sjc_add_query_vars($vars) { return array('modem') + $vars; } add_filter('query_vars', 'sjc_add_query_vars'); function streaming_template($template) { global $wp; if ($wp->query_vars['modem']=='price_quality') { return dirname( __FILE__ ) . '/pq-modem.php'; }elseif ($wp->query_vars['modem']=='price_quality') { return dirname( __FILE__ ) . '/pq-modem2.php'; } else { return $template;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Help me with Query_Var’ is closed to new replies.