Throughout the theme we use the a very verbose way to get the
members only id: get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_
ONLY_ID) -- this is meant to simplify that.
require_once 'lib/menu-walker.php';
require_once 'lib/navigation.php';
+define( MEMBERS_ONLY_ID, get_option( GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID ) );
+
$ancestorId = null;
$includePages = array();
$frontPageId = get_option('page_on_front');
<ul class="menu">
<li><a href="<?php bloginfo('url')?>">Home</a></li>
<li><a href="<?php echo get_permalink(259);?>">Contact Us</a></li>
+ <li><a href="<?php echo get_permalink(MEMBERS_ONLY_ID);?>">Members Area</a></li>
</ul>
</div>
<div class="large-3 columns show-for-large">
<?php get_template_part('parts/chamber-sidebar-left'); ?>
</div>
- <?php } else if(is_in_tree(get_option(GLM_MEMBERS_PLUGIN_OPTION_MEMBERS_ONLY_ID))) { ?>
+ <?php } else if(is_in_tree(MEMBERS_ONLY_ID)) { ?>
<?php get_template_part('sections/glm-members-only'); ?>
<?php } else if (is_member()) { ?>
<?php if(!is_front_page()) {