How to unregister sidebar for template_part?
-
Hi everybody,
can you help me please?I have this code in my index.php:
<?php get_sidebar(); ?>
And I have a template_part ‘loop-fullwidth’,
which I call in index.php.I need to register sidebar for index.php and
unregister sidebar for a ‘loop-fullwidth’.Can’t do it. Tried to write in index.php code like
this:<?php if(!is_singular('partials/loop', 'fullwidth')); get_sidebar(); else if: unregister_sidebar(); ?>
But it didn’t help.
I just start to learn php, can’t figure out how to solve
this.Can anybody help me please?
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘How to unregister sidebar for template_part?’ is closed to new replies.