WordPress.org

Ready to get started?Download WordPress

Forums

Scrappy
[resolved] Adding an 'Edit' link (8 posts)

  1. snowffairy
    Member
    Posted 2 years ago #

    Just because I'm new to code and defensive, I will say I googled/searched WP.org already and did find directions, but my application of them didn't work, so apparently I don't know what I'm missing.

    Can a patient someone please tell me where to insert the <?php edit_post_link(); ?> code? I haven't figured out "The Loop" yet.

    TIA

    http://wordpress.org/extend/themes/scrappy/

  2. Fire Truck
    Member
    Posted 2 years ago #

    It should be included in the index.php somewhere between the lines

    <?php while (have_posts()) : the_post(); ?>

    and

    <?php endwhile; ?>

    Where the link will appear depends on where you put the line

    <?php edit_post_link(); ?>

    Experiment a little and you'll find what is best for you!

  3. Caroline Moore
    Member
    Theme Author

    Posted 2 years ago #

    To clarify--the theme should already have an edit link in the form of a tab to the left of the content area, just under the post date. If you want to change this that's totally OK (once again, I'd suggest doing so by way of a child theme so your changes don't get overwritten in a future theme update) but there should be a link there already. If not, there might be something broken. Just making sure it's not the latter. :)

  4. snowffairy
    Member
    Posted 2 years ago #

    A tab under the date would be so elegant-- I actually don't see one, but if there's a way to add it in, I'll follow directions.

  5. Caroline Moore
    Member
    Theme Author

    Posted 2 years ago #

    There should already be an Edit tab there (provided you're logged into the site).

  6. snowffairy
    Member
    Posted 2 years ago #

    To respond to your response, I'm in and out of my editor (I think that means I'm logged in) but I have only the date-tag beside the post.

    (Am I supposed to say where I am? It's Helmericks.net, if that's in any way useful.)

    Off to try the sidebar advice and see if that fixes things (sorry for crossing topics, I'm a little confused here.

  7. Caroline Moore
    Member
    Theme Author

    Posted 2 years ago #

    Since it's only displayed when you're logged in, I can't really troubleshoot. It's possibly a browser issue, and the tab is "hidden" behind another element.

    You can try using Firebug to look at the code. You should be able to find a string like this if you're logged in:

    <a class="post-edit-link" title="Edit Post" href="http://helmericks.net/wp-admin/post.php?post=188&action=edit">Edit</a>

    If that code is there, the link is there, just being hidden for some reason. If it's not there, your browser or WordPress isn't seeing you as being logged in.

    Here's a ss of what the demo site looks like when I'm logged in.

  8. snowffairy
    Member
    Posted 2 years ago #

    I finally just logged out and re-logged-in, and it worked.

    Thanks so much for your patience.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags