Archive for July, 2014

Bulk show/hide pages in WordPress

We use the plugin Exclude Pages to show or hide pages in the navigation of our WordPress sites.

exclude-1
It’s very useful, but if you suddenly need to show or hide a lot of pages, it becomes tedious and a waste of time to do it through the WordPress backend.

That’s why I looked at how to bulk edit this in the database directly. Start by locating the correct table in MySQL:

exclude-2

Then add or remove page ids as needed. (Note: The numbers that appear here are the pages that are hidden from the user)

Code snippet for Offshore 2013 morph

Here is some code I wrote to add a clickable triangle, and a custom background, to the ewea.org website to highlight the offshore event.

The HTML:

<div id="offshore-morph" style="position: absolute; top: 0; left: 0; z-index: 99999;">
<a title="Click to register for EWEA OFFSHORE 2013" href="/offshore2013/registration/?ref=morph">
<img src="http://www.ewea.org/uploads/pics/offshore-2013-morphing-corner.png"></a></div>

And some CSS:

body {background: url(http://ewea.org/uploads/pics/offshore-2013-morphing.jpg) 100% 0 no-repeat #005596; position: relative;}