edit_post_link outside wp directory? what’s missing?
-
Hi, I can’t seem to get the “edit this post” (edit_post_link) to show up on an index.php that’s outside of my wordpress directory. I put (I think correctly) “the loop” there and I can get the post, the title, category and comments . . . but the “edit” doesn’t show up.
I’m thinking the problem could do with cookies, something with the combination of examples I’m following, I don’t know. I’m really not great at writing or reading PHP. But, I am logged in and I’ve refreshed my browser so . . .
I did get vardump to output but couldn’t make sense of it.
Here’s some code if you want to check it out. THANKS A TON:
<?php
require_once("./wordpress/wp-blog-header.php");
?><?php
$posts = get_posts('numberposts=5');
foreach ($posts as $post) :
start_wp();
?><h3><a href="/wordpress/wp-admin/">
<?php the_title() ?></a></h3>
<?php the_content() ?><p class="postmetadata">Posted in <?php the_category(', ') ?> <strong>|</strong>
<?php edit_post_link('Edit','','<strong>|</strong>'); ?>
<?php
endforeach;
?>
- The topic ‘edit_post_link outside wp directory? what’s missing?’ is closed to new replies.