Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
check a page is private or not?
#1
Hi, how do I find a page is private or not? what template tags i should use?

Thanks..
Reply
#2
I had replied to this, but my post disappeared. :-?
Reply
#3
Me too dumbass site move bullshit
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#4
@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; ?>
Reply
#5
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 ?>
Reply
#6
(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
Reply




Users browsing this thread: 1 Guest(s)