Adding “Post New” On Home Page
-
On my homepage I would like to add a “Post New” link which appears when logged in. My WordPress blog is stored in a sub-directory in my website:
wwwroot/
–> news/
——> wp
–> index.phpI have added the following into “index.php”, but it doesn’t appear to be working:
<?php require $_SERVER['DOCUMENT_ROOT'].'/news/wp-blog-header.php'; ?> <?php if ( current_user_can('publish_posts') ): ?> <div class="user-controls right"> <a href="news/wp-admin/post-new.php">Post New</a> </div> <?php endif; ?>
Many thanks,
Lea Hayes
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Adding “Post New” On Home Page’ is closed to new replies.