Home › Forums › Community Forum › Hide the Log In Link in a menu
This topic contains 10 replies, has 3 voices. Last updated by Mike Lowndes 4 years, 2 months ago.
Topic Author | Topic |
---|---|
Posted: Friday Oct 19th, 2012 at 9:48 am #29004 | |
|
|
Hi All, i want to add a link in the menu for users to LOG IN to the membership site – This is easy and i’ve added a menu link to the page. BUT If a user has LOGGED IN i want to hide this link Displaying a LOG IN link when a user has logged in will be confusing Can you help? |
List Of Topic Replies
Author | Replies |
---|---|
Author | Replies |
Posted: Friday Oct 19th, 2012 at 10:07 am #29013 | |
|
|
Hi Mike, maybe you can set up two menus. One for visitors and the other one for members.
You can put that code in your theme header.php file where the old menu is. hope it helps |
|
Posted: Friday Oct 19th, 2012 at 10:12 am #29016 | |
|
|
Good thinking Christian, I’ll give it a try and let you know |
|
Posted: Friday Oct 19th, 2012 at 10:16 am #29018 | |
|
|
me again, :) on wordpress codex site is a complete guide. here Register Menus Firstly, in your theme’s functions.php, you need to write a function to register the names of your menus. (This is how they will appear in the Appearance -> Menus admin screen.) As an example, this menu would appear in the “Theme Locations” box as “Header Menu”.
And this would make two menu options appear, header menu and extra menu
Display Menus on Theme
additional information have a look at: http://codex.wordpress.org/Navigation_Menus try it it’s not so hard :) |
|
Posted: Friday Oct 19th, 2012 at 11:28 am #29034 | |
|
|
ooops, i think i found something you may looking for on the codex wordpress site Description Usage
Parameters Example
really simple |
|
Posted: Friday Oct 19th, 2012 at 11:35 am #29036 | |
|
|
You’re a start thank you. Just one question – I’m no programmer – more of a cut and shunt coder – How would i use this code? Thanks for all your help Mike |
|
Posted: Friday Oct 19th, 2012 at 6:07 pm #29078 | |
|
|
Hi again, you can just put this snippet in your theme where you wish to display that “Log in | Log Out” function. If you want it in your header next to the menu (perhaps) Just have a look in your theme folder for the file “header.php” -> edit this file by inserting this peace of code
In the default theme (twenty eleven) for example
you can paste it between 134-135
hope it helps |
|
Posted: Monday Oct 22nd, 2012 at 5:44 am #29234 | |
|
|
Thanks Christian – that’s fixed it nicely – ive just got to figure out how the format it the same as the other menu items now. If you have any suggestions feel free. here’s the shell site http://networkmarketingsystem.mikelowndes.com |
|
Posted: Monday Oct 22nd, 2012 at 12:55 pm #29278 | |
|
|
Hi Mike, as i could see the css needs to be fixed. take a look at the screenshot i made your code need to be inside the div command.
that was quick and dirty google chrome html editing :-)
hope that will help you |
|
Posted: Tuesday Oct 23rd, 2012 at 5:31 am #29363 | |
|
|
[note_box]
Christian, I gave you the “Helpful User” badge. Thanks! :) [/note_box] |
|
Posted: Tuesday Oct 23rd, 2012 at 5:50 am #29366 | |
|
|
Christian – Thank you – that worked perfectly and all is ready for the new theme… :-) |
This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.