Can you complete this very short code snippet? Please!
-
Hi folks,
hope I have posted this in the right section, can someone help complete this code snippet.I have managed to set up a different dynamic sidebar for each category on my site using the code below, but I need the individual posts in each category to show that sidebar too which this code doesn’t do.
Can someone please add the necessary syntax so it does just that (and insert it in the snippet where it needs to go)
Here is the code…
$sidebar_id = ( is_category() ) ? sanitize_title( get_cat_name( get_query_var( 'cat' ) ) ) . '-sidebar' : 'sidebar'; dynamic_sidebar( $sidebar_id );
Thanks in advance.
(Theme is 2012 default)
- The topic ‘Can you complete this very short code snippet? Please!’ is closed to new replies.