• Resolved stew278

    (@stew278)


    Does anyone know if it possible to have the edit_post_link tag work in an Archives template? I have had no luck putting it in and would appreciate anyone’s help.

    btw: yes, I’ve placed it within the Loop, but no luck.

Viewing 7 replies - 1 through 7 (of 7 total)
  • What do you call an Archives template?
    archive.php – yes.
    archives.php – (which is a Page template BTW listing months and categories) no.

    Thread Starter stew278

    (@stew278)

    In 2.0, it’s archive.php

    Can you explain how to, moshu? Thnx.

    What do you mean “how to”? It just has to be inserted in the template file.
    Whether it’s archive.php or archives.php – that depends on the theme, not the WP version. Some themes have one of them, others none of them… and some both ??
    Which theme?

    Can’t you just look at how it is inserted in the index.php and copy the code into your archive template?

    Thread Starter stew278

    (@stew278)

    Nope; I’ve been trying that and I get Parse error: parse error, unexpected '}'

    Here’s what I am using:

    <?php } edit_post_link('<img src="'.get_bloginfo(template_directory).'/images/icon_edit.gif" alt="Edit Link" />','<span class="editlink">','</span>'); ?>

    … which is working in the single.php template.

    I don’t have such a code. Which theme?

    Thread Starter stew278

    (@stew278)

    Was a modified one I believe from Kubrick theme. Was searching and found someone who had modified the edit_post_link to display an image/icon instead of the text, Edit Entry

    I have just figured it out though … what seems to have been the problem was the } right after the <?php … I deleted that and now it works in my index.php file, but I need it there to work on the single.php file ……….

    Weird, huh?

    One line of code taken out of context might seem “weird” but probably it was part of a bigger picture ??

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Edit Post in Archive?’ is closed to new replies.