Gambalunga
💖 Chevereto Fan
I have a Chevereto site set to Private mode which means that only logged in users can view the contents. I however wanted some (not all) of the pages, specifically Instructions for use, Terms of service, and Contact to be visible to potential new users. Ideally the pages could have "Page visibility" with a third setting "Public page" so that that page would be visible to all site users, however this would require too many code modifications.
As a solution I added a little bit of code to the end of a copy the app/themes/Peafowl/header.php and placed it in the app/themes/Peafowl/overrides directory.
The following code was added just before the last </ul> 4 lines from the bottom of the header.php
The listed pages are, of course, direct links (not a real domain) just to keep it simple.
As a solution I added a little bit of code to the end of a copy the app/themes/Peafowl/header.php and placed it in the app/themes/Peafowl/overrides directory.
The following code was added just before the last </ul> 4 lines from the bottom of the header.php
The listed pages are, of course, direct links (not a real domain) just to keep it simple.
Code:
<!- extra code for menu here ->
<?php
if(!CHV\Login::isLoggedUser()) {
?>
<?php
if(get_pages_link_visible()) {
?>
<li data-nav="about" class="phone-hide pop-btn pop-keep-click pop-btn-delayed">
<span class="top-btn-text"><span class="icon icon-info tablet-hide laptop-hide desktop-hide"></span><span class="text phone-hide phablet-hide"><?php _se('About'); ?></span><span class="arrow-down"></span></span>
<div class="pop-box arrow-box arrow-box-top anchor-right">
<div class="pop-box-inner pop-box-menu">
<ul>
<li><a href="https://www.mysite.ex/page/ifu">Instructions for use</a></li>
<li><a href="https://www.mysite.ex/page/tos" target="_blank">Terms of service</a></li>
<li><a href="https://www.mysite.ex/page/contact">Contact</a></li>
</ul>
</div>
</div>
</li>
<?php
}
}
?>
<!- extra code finish here ->