• 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;
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)
  • When the index and the install are not in the same directory one of the disadvantages is not having the “Edit this” link 🙁

    Thread Starter mrjohncory

    (@mrjohncory)

    Dang. Is that all there is to it? By “install” you mean allllll those wp guts? Shoot! Dern it. Man.

    Thanks, Moshu.

    Thread Starter mrjohncory

    (@mrjohncory)

    wait, so, like, why isn’t that possible?

    thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘edit_post_link outside wp directory? what’s missing?’ is closed to new replies.