|
#1

Oct 25, 2011, 03:12 PM
|
|
Great theme, terrific support, thank you.
I have a question. I recently added next/previous navigation on each of my single posts. I am using a static front page with password protection which a user must enter to get to the posts.
On this static page where the password box is, the navigation links appear. I would like to disable/hide these links on this static page and keep it for the single posts.
Any ideas?
Thanks in advance!
|
#2

Oct 25, 2011, 04:26 PM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
you could use the CSS 'display: none;' on the element and use 'body.logged-in' as part of the selector.
so you would have (where 'element' is the html element in question)
HTML Code:
element {display:none;}
body.logged-in element {display: block;}
so it would shut it off for everything, then if the user is logged in, it would turn it on
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3

Oct 26, 2011, 01:32 AM
|
|
Thank you for that. Just a bit more clarification if possible.
Where would this code be entered? What variable would element need to be replaced with?
element {display:none;}
body.logged-in element {display: block;}
|
#4

Oct 26, 2011, 04:35 AM
|
|
I found this in css:
div.navigation-top {
<?php bfa_incl('next_prev_style_top') ?>
}
Is this the location?
Would it look like:
div.navigation-top {display:none;}
body.logged-in element {display: block;}
Not sure if where this gets inserted exactly.
Thanks again, Jack
|
#5

Oct 26, 2011, 04:43 AM
|
|
you are genius .. just figured it out
thank u
|
#6

Oct 26, 2011, 04:45 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
it goes in the option 'CSS Inserts' - give it a try.
buy: the second line - you need to change 'element'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7

Oct 26, 2011, 04:45 AM
|
|
actually, the links disappeared when logged out, but do not appear when logged in
i did this:
div.navigation-top {display:none;}
body.logged-in div.navigation-top {display: block;}
div.navigation-top {
<?php bfa_incl('next_prev_style_top') ?>
}
div.navigation-middle {
<?php bfa_incl('next_prev_style_middle') ?>
}
div.navigation-bottom {display:none;}
body.logged-in div.navigation-bottom {display: block;}
div.navigation-bottom {
<?php bfa_incl('next_prev_style_bottom') ?>
}
|
#8

Oct 26, 2011, 05:14 AM
|
|
well, i can't get the links to reappear when logged in.
is there anything else I can do?
thanks
|
#9

Oct 26, 2011, 05:27 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
all you should have to do is go to ATO->Add HTML/CSS Inserts->CSS Inserts and add
HTML Code:
div.navigation-top {display:none;}
body.logged-in div.navigation-top {display: block;}
you should not be changing any theme code.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#10

Oct 26, 2011, 05:36 AM
|
|
thank you, yes, once you made the clarification, i left the theme code alone and entered the code in css inserts exactly as you have stated. when logged out, the nav links are hidden as intended, but when logged in, they are still hidden. that is my dilemma.
|
#11

Oct 26, 2011, 05:43 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
I'd have to take a look to see what was happening
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#12

Oct 26, 2011, 05:46 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
When logged in, go to a page and then view the source
Look for the <body......> statement and see if the class 'logged-in' exists. If they are logged into Wordpress as a user, it should show up. If you are using some other login scheme, then there might be another class you need to use.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#13

Oct 26, 2011, 06:44 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Ok, the way you are doing this, the user is not really logging into Wordpress so the class 'logged-in' is not set by Wordpress. There is nothing that indicates the user is actually logged in. You might want to reconsider the way you are doing this.
Where did you get this method from?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#14

Oct 26, 2011, 06:44 AM
|
|
perhaps thats why its not working properly. i do not provide wordpress user access to posts, just password post protection using a global password. i use the plugin titled global post password.
|
#15

Oct 26, 2011, 06:53 AM
|
|
i put it together just by looking for a way to protect posts, then added search engine blocking and no follow tags, i am a weekend warrior and was looking for something functional
|
#16

Oct 26, 2011, 07:05 AM
|
|
perhaps you are suggesting to use wordpress user names for access to this area?
|
#17

Oct 26, 2011, 07:20 AM
|
 |
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
I'd check to see if the plugin can assign a user I'd, maybe a global one, so Wordpress would assign the class and you could use it inthe css
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
|