So I have my admin bar hidden by default, because it's ugly, instead of writing a bunch of if statements so certain elements to the WP-admin panel only appear for logged in users, so far so good.
The one I'm having trouble with is the 'all posts' screen, the url is wp-admin/edit.php, yet that gives me a 404 error.
This works, takes the user to the new post screen.
<?php
global $user_login;
get_currentuserinfo();
if ($user_login) :
?>
<div class="sectionblocktwo">
<div class="writeurl">
<a href="/wp-admin/post-new.php">Write</a>
</div> <!-- end div loginurl -->
</div><!-- end div sectionblocktwo -->
<?php endif; ?>
This does not work. This only fails to work when on the single.php, since it's an looking for the url sitename.com/single-post-name/wp-admin/edit.php, the other links work fine on single pages.
<?php
global $user_login;
get_currentuserinfo();
if ($user_login) :
?>
<div class="sectionblocktwo">
<div class="loginurl">
<a href="wp-admin/edit.php">My Posts</a>
</div> <!-- end div loginurl -->
</div><!-- end div sectionblocktwo -->
<?php endif; ?>
Is there some php code or something I can use to link to the all posts part of the dashboard?