Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
contents only visible to admin
#1
Hi, this is my first post here.
How can I make certain page contents visible to the admin only?
Thanks!
Reply
#2
Page options, page visibility, Private

Does anyone even read the wiki ?
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#3
damn - I guess I should never post before coffee
Thanks!
Reply
#4
lol, i just looked and its here
http://get-simple.info/wiki/how_to:page_editing
although the images and some info is way outdated.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply
#5
(2013-10-26, 23:20:06)shawn_a Wrote: lol, i just looked and its here
http://get-simple.info/wiki/how_to:page_editing
although the images and some info is way outdated.

I made some changes.
Reply
#6
Hi,


I did actually read the wiki, but either there is a piece of information missing, or something does not work right on my site:


Choosing "private", the page gives a 404 when not logged in - fine. But the menu item remains visible. Should it not disappear? I can switch it off, of course, but then the page could not be found anymore at all ...


Thanks!
Reply
#7
(2015-09-14, 05:58:06)wdburgdorf Wrote: Hi,


I did actually read the wiki, but either there is a piece of information missing, or something does not work right on my site:


Choosing "private", the page gives a 404 when not logged in - fine. But the menu item remains visible. Should it not disappear? I can switch it off, of course, but then the page could not be found anymore at all ...


Thanks!

try to get content when you are login into admin area:

PHP Code:
if (isset($_COOKIE['GS_ADMIN_USERNAME'] == 'admin')){
//do something / echo something // 

or try change the navigation (you must have instaled a i18n navigation)

PHP Code:
<?php get_i18n_navigation(return_page_slug(),0,1,I18N_FILTER_MENU I18N_FILTER_LANGUAGE); ?>
user plugin: scroll to top
Reply
#8
This is expected, it has always been this way.
You can make your own navigation function and use that instead...

just copy get_navigation
and a private and logged in check, perhaps you also want a author is user check, we don't know what you want therefore we do not filter them.

PHP Code:
            if ($page['menuStatus'] == 'Y') {
                if(!
is_logged_in() && (string)$page['private'] == 'Y') continue; 
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 1 Guest(s)