Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Excerpts, Read more, Pagination »

Hiding Navigation Links on Pages, Keeping them on Posts


  #1  
Old Oct 25, 2011, 03:12 PM
jackieboy
 
12 posts · Oct 2011
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  
Old Oct 25, 2011, 04:26 PM
juggledad's Avatar
juggledad
 
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  
Old Oct 26, 2011, 01:32 AM
jackieboy
 
12 posts · Oct 2011
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  
Old Oct 26, 2011, 04:35 AM
jackieboy
 
12 posts · Oct 2011
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  
Old Oct 26, 2011, 04:43 AM
jackieboy
 
12 posts · Oct 2011
you are genius .. just figured it out

thank u
  #6  
Old Oct 26, 2011, 04:45 AM
juggledad's Avatar
juggledad
 
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  
Old Oct 26, 2011, 04:45 AM
jackieboy
 
12 posts · Oct 2011
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  
Old Oct 26, 2011, 05:14 AM
jackieboy
 
12 posts · Oct 2011
well, i can't get the links to reappear when logged in.

is there anything else I can do?

thanks
  #9  
Old Oct 26, 2011, 05:27 AM
juggledad's Avatar
juggledad
 
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  
Old Oct 26, 2011, 05:36 AM
jackieboy
 
12 posts · Oct 2011
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  
Old Oct 26, 2011, 05:43 AM
juggledad's Avatar
juggledad
 
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  
Old Oct 26, 2011, 05:46 AM
juggledad's Avatar
juggledad
 
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  
Old Oct 26, 2011, 06:44 AM
juggledad's Avatar
juggledad
 
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  
Old Oct 26, 2011, 06:44 AM
jackieboy
 
12 posts · Oct 2011
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  
Old Oct 26, 2011, 06:53 AM
jackieboy
 
12 posts · Oct 2011
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  
Old Oct 26, 2011, 07:05 AM
jackieboy
 
12 posts · Oct 2011
perhaps you are suggesting to use wordpress user names for access to this area?
  #17  
Old Oct 26, 2011, 07:20 AM
juggledad's Avatar
juggledad
 
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

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems changing colors on links in pages/posts sleenie Center area post/pages 1 Sep 2, 2011 06:53 PM
[SOLVED] How to create links in posts and pages lmt Center area post/pages 8 Jan 22, 2010 08:57 PM
Next/Previous Navigation on MULTI Post Pages for posts with many categories assigned joan Post-Kicker, -Byline & -Footer 4 Jan 8, 2010 03:27 PM


All times are GMT -6. The time now is 08:18 AM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.