First we need to understand a number of basic important concepts and definitions that determine how web page content is rendered.
Author Archives: tabcom
WordPress: Display the Primary Sidebar only for certain menu options
To only display the Primary Sidebar for certain menu options, you can change this:
sidebar.php
... <?php dynamic_sidebar('sidebar-primary'); ?> ...
…into this:
... <?php if (is_category('mycategory')) { ?> <?php dynamic_sidebar('sidebar-primary'); ?> <? } ?> ...
What this does is as follows: if you have a menu option that shows all posts in category “mycategory”, the Primary Sidebar will be displayed. For all other menu options, the Primary Sidebar will not be displayed.
CSS: position:absolute;
When using CSS “position:absolute;” statements for a nested <div> element, be mindful which parent <div> is used for anchoring.