GetSimple Support Forum

Full Version: check a page is private or not?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, how do I find a page is private or not? what template tags i should use?

Thanks..
I had replied to this, but my post disappeared. :-?
Me too dumbass site move bullshit
@whiteh0rs3

A possible way to check if the current page is private or not:

PHP Code:
<?php if (getPageField(get_page_slug(0),'private') == 'Y'): ?>
... this page is <strong>private</strong> ...
<?php else: ?>
... this page is not private ...
<?php endif; ?>
thanks Carlos..

I tried before in any other way (alternative), make use of plugins "GS_Shortcode" PageField.

PHP Code:
<?php if (do_shortcode('[pagefield field="private" /]') == 'Y') { ?>
... this page is <strong>private</strong> ...
<?php }else{ ?>
... this page is not private ...
<?php ?>
(2013-04-14, 08:29:00)shawn_a Wrote: [ -> ]Me too dumbass site move bullshit

Glad you appreciate my hard work making the site faster and more reliable. Sad