Using get_option for Members Only footer link
authorLaury GvR <laury@gaslightmedia.com>
Tue, 15 Aug 2017 20:44:32 +0000 (16:44 -0400)
committerLaury GvR <laury@gaslightmedia.com>
Tue, 15 Aug 2017 20:44:32 +0000 (16:44 -0400)
The method of get_page_by_slug seems to have difficulty with child
pages, so instead we're using get_permalink with get_option for
getting the Members Only link in the footer.

parts/client-info-footer.php

index 5636a91..47787e1 100644 (file)
@@ -11,7 +11,7 @@
             </span>
         </a>
         <br>
-        <a class="footer-members-only" href="<?php echo get_permalink( get_page_by_path('members-only') ); ?>">Members Only</a>
+        <a class="footer-members-only" href="<?php echo get_permalink(get_option("glm_members_database_option_members_only_id")); ?>">Members Only</a>
     </div>
 
     <?php endif;?>
@@ -46,7 +46,7 @@
         <?php $contactPage = get_post(3038);?>
         <?php if($contactPage):?>
         <span class="bullet"> &#124; </span><span><a href="<?php echo get_page_link($contactPage->ID);?>">Contact Us</a></span>
-        <span class="bullet"> &#124; </span><span><a href="<?php echo get_permalink( get_page_by_path('members-only') ); ?>">Members Only</a></span>
+        <span class="bullet"> &#124; </span><span><a href="<?php echo get_permalink(get_option("glm_members_database_option_members_only_id")); ?>">Members Only</a></span>
         <?php endif;?>
     </div>