Hiding an aside section if PHP returns no output
-
Great plugin, Otto.
I’m sure this question is way beyond the scope of your support responsibility, but I thought you might have a suggestion.
I’m using the plugin (in the Primary Sidebar widget area) to dynamically generate a “local menu” of pages in a section (i.e., children of the current page). I can further explain, if necessary. But the issue is that in some cases, there IS NO local menu to display. However, the aside section is still generated in those cases, and the sidebar presents as an empty section element within the aside with class sidebar-primary, with the styling of .sidebar-primary.
I’d like to be able to hide the section if my php code returns nothing.
Would the best approach be to write a little jQuery function (and I’m about to betray how little I know about jQuery) that looks for a section with class “widget_execphp” that contains a div with class “execphpwidget” that has no innerHTML, and then hide the section?
Jeff
- The topic ‘Hiding an aside section if PHP returns no output’ is closed to new replies.