PHP check for pages – sidebar output
-
In the Blix sidebar.php there is
<?php if (is_home() || is_page()) { ?>
<h2>Pages</h2>So if it is a home or a page it outputs this header and the Pages UL but it doesn’t check whether there might be no pages. Because of a previous function in that page I thought I’d try this:
<?php if ($pages && is_home() || is_page()) { ?>
but then I got not sidebar at all! Probably a poor assumption on my part… or a poor test for $pages emptiness?
- The topic ‘PHP check for pages – sidebar output’ is closed to new replies.