• <?php if(current_user_can('read')){
                <a href="http://www.somewebsite.com/wp/wp-login.php?action=logout">logout</a></li>
    			<?php wp_list_pages('&exclude=104&sort_column=menu_order&title_li&depth=2'); ?></li>
    			<?php wp_list_categories('orderby=name&title_li&include=125,9&depth=2');?> </li> {
    		  } else {
              			<a href="http://www.somewebsite.com/wp/wp-login.php">login</a> ; } ?>
    			<?php } ?>

    it’s not working… why?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter dotblend

    (@dotblend)

    <li><?php
          if (current_user_can('read') )
            $link = '<a href="' . get_settings('siteurl') . '/wp-login.php?action=logout">' . __('Logout') . '</a>';
         else
            $link = '<a href="' . get_settings('siteurl') . '/wp-login.php">' . __('Login') . '</a>';
     echo apply_filters('loginout', $link);
    
    ?></li>

    this was the solution

    Thread Starter dotblend

    (@dotblend)

    but somehow this does not work in ie6…
    does someone have a solutions for this?

    <?php
          if (current_user_can('read') )
    	  	wp_list_pages('&exclude=1,231&sort_column=menu_order&title_li&depth=3');
    
    		?>
    </li>
    <li><?php
          if (current_user_can('read') )
            $link = '<a href="' . get_settings('siteurl') . '/wp-login.php?action=logout">' . __('Logout') . '</a>';
         else
            $link = '<a href="' . get_settings('siteurl') . '/wp-login.php">' . __('Login') . '</a>';
     echo apply_filters('loginout', $link);?></li>

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘current user can / cannot’ is closed to new replies.