Skip to content

Instantly share code, notes, and snippets.

View carasmo's full-sized avatar

Christina carasmo

  • Florida
View GitHub Profile
@carasmo
carasmo / ep_exclude_password_protected_pages.php
Last active June 8, 2016 18:54 — forked from bonny/ep_exclude_password_protected_pages.php
Automatically remove password protected page from wp_list_pages wherever this function is used such as the genesis sitemap.
/** ======================================================================================
*
* Automatically Exclude Password Protected Pages
*
* Kudos: https://gist.github.com/bonny/5772054
* The original (linked above) uses an argument:
* wp_list_pages('title_li=&post_type=faqs&echo=0&exclude_password_protected=1')
*
======================================================================================= */
function ca_exclude_password_protected_pages($pages, $r) {