Forums

Much answer (15 posts)

  1. Vicar1992
    Member
    Posted 2 years ago #

    Hello, i am an italian boy so i speak bad english..

    I have a blog and i have a menu..

    1. I would view a part of menu only not registred(login)..and a part of menu only registred(Logout) ..Do you understand?
    How i do that?

    2. How I do to see a page only registred?

    3. Login's name, Where is that variable? I would insert that name in home page.. How i do that?

    Sorry for my bad english :(

  2. Vicar1992
    Member
    Posted 2 years ago #

    Nothing? :(

  3. Christian Schenk
    Member
    Posted 2 years ago #

    Are you looking for these two functions?

    Do you need help using them? Have a look at the default theme under wp-content/themes/default and open the file sidebar.php - you can find an example there.

    Still no luck? Just tell us...

  4. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    My guess was that Vicar1992 wants part of the sidebar to be hidden to unregistered users. But I couldn't find a decent plugin that could do that and I don't currently have the functioning brain cells to try and write the code for it. :-(

  5. Christian Schenk
    Member
    Posted 2 years ago #

    If he wanted to do that he could wrap the corresponding part of the sidebar with is_user_logged_in.

  6. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    That's it! See - said the brain wasn't functioning properly.

  7. Christian Schenk
    Member
    Posted 2 years ago #

    Don't drink and code ;)

  8. esmi
    Theme Diva & Forum Moderator
    Posted 2 years ago #

    I wish! I might have enjoyed it. Viruses on the other hand...

  9. Christian Schenk
    Member
    Posted 2 years ago #

    Hope it's not the swine flu - everybody is afraid of it here in Germany ;) Anyway, take some rest.

    Man, we're getting off topic here...

  10. Vicar1992
    Member
    Posted 2 years ago #

    Thnakyou but it doesn0t work :(

    <div class="secondmenu">
    		<ul>
    			<li class="first" <?php if (is_page('schedina-serie-a')) { echo " id=\"firstcurrent\""; } ?>>
    <a href="<?php bloginfo('url'); ?>/schedina-serie-a/" title="Gioca la schedina">Gioca la schedina</a>
    			</li>
    			<li class="last" <?php if (is_page('URL')) { echo " id=\"lastcurrent\""; } ?>>
    <a href="<?php bloginfo('url'); ?>/wp-login.php/" title="Login">Log-in</a>
    			</li>
    		</ul>
    	</div>
    <?php
    
    if ( is_user_logged_in() ) {
    			<li class="last" <?php if (is_page('URL')) { echo " id=\"lastcurrent\""; } ?>>
    <a href="<?php bloginfo('url'); ?>/wp-login.php/" title="Login">Log-in</a>
    			</li>
    } else {
    			<li class="last" <?php if (is_page('URL')) { echo " id=\"lastcurrent\""; } ?>>
    <a href="<?php bloginfo('url'); ?>/wp-login.php/" title="LOGOUT">LOGOUT</a>
    			</li>
    };
    ?>

    In up there is a Menu, and down the code.. How do you do? :(

  11. powerfulsmile
    Member
    Posted 2 years ago #

    I haven't default's theme..
    :(

  12. Christian Schenk
    Member
    Posted 2 years ago #

    @Vicar1992: try replacing is_user_logged_in() with !$user_ID, maybe that's better. Anyway, it should work as expected and if we knew what you're really trying to do maybe we can tell you what's wrong.

    @powerfulsmile: go to wordpress.org/download, grab the latest version of WordPress, unzip it and navigate to the folder wp-content/themes: you'll find a folder "default" there.

  13. Vicar1992
    Member
    Posted 2 years ago #

    Ok, I would this menu..

    For Registred User
    <img src="http://i49.tinypic.com/mjq1ab.png" border="0">

    For Visitator
    <img src="http://i46.tinypic.com/oqj7ty.png" border="0">

  14. Vicar1992
    Member
    Posted 2 years ago #

    Nothing? It is important :( Pleaseeeee :)

  15. powerfulsmile
    Member
    Posted 2 years ago #

    Ok thanks for theme but i can't do the same of Vicar1992

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.