Forums

edit_post_link doesn’t work with WordPress installed in subdirectory (6 posts)

  1. trishacupra
    Member
    Posted 2 years ago #

    Hi,

    I install WP a lot and lately I've started installing my WP installations in a subdirectory called 'wordpress' to keep the top level nice and neat. I follow the instructions at
    http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory

    I've noticed that the Edit Post Link

    <?php edit_post_link(); ?>

    doesn't work when WP has it's own directory. Is there any way to fix this?

  2. trishacupra
    Member
    Posted 2 years ago #

    And if there isn't a way to easily get around this without editing (or patching) core files, is there a way to work around it by creating a link that will allow me to directly edit that specific post (instead of just a link to the Dashboard) that I can use instead of edit_post_link? I'm hoping for it to be dynamic - I know I can do it manually.

  3. Gisha James
    Member
    Posted 2 years ago #

    <?php edit_post_link(); ?> will work for subdirectory installation also.

    May I know the URL - where it is not working?

  4. trishacupra
    Member
    Posted 2 years ago #

    Hi GJames

    It's very strange - it didn't work when I was logged in as Admin, but now I'm logged in as an Editor it does appear.

    The url is a test site at http://ecodepot.trishacupra.com/

  5. kimflournoy
    Member
    Posted 2 years ago #

    I think this is just an issue with your browser cookie -- log out and log in again, and the problem should resolve itself.

  6. trishacupra
    Member
    Posted 1 year ago #

    Wow. You're right. It is just a matter of logging in and out after editing the theme to include an 'edit post' link, and then the Edit link appears.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic