WordPress.org

Forums

Automatically adding code into img tag (7 posts)

  1. louse101
    Member
    Posted 8 years ago #

    Ok so my topic subject line doesnt make much sense, so i'll try and be descriptive here.

    Basically all I want to do is have WordPress add 'rel="lightbox"' into the image display code so the code goes from looking like:

    '< a title="IMG.jpg" href="URL.jpg">'

    to:

    '< a rel="lightbox" href="URL.jpg">'

    And yes, I want to replace the 'title' tag with the rel= tag.

    Obviously I could edit this in each post I make but that would ultimately be more time consuming. It would be far easier if I modified the code of WordPress so when the image uploader sends the code to the editor it already includes the rel= tag.

    Hope to get some help on this soon.

    Nate Lanxon

  2. ashishmishra
    Member
    Posted 8 years ago #

    how it works

  3. louse101
    Member
    Posted 8 years ago #

    I solved half of the problem. I needed to edit a section in inline-uploading.php'.

  4. louse101
    Member
    Posted 8 years ago #

    Bump. Anyone have any ideas with this?

  5. KatGirl
    Member
    Posted 8 years ago #

    You have posted this question twice.

    And it helps enormously if you leave the title tag in place within a hyperlink. Accessability is important.

    Specialised readers will voice that tag out, so those who cannot view your website will at least have their machine to read it to them and know what that link / image is.

  6. louse101
    Member
    Posted 8 years ago #

    I decided to leave the title tag in for that very reason actually.

    Any idea about inserting the rel="lightbox" tag though?

  7. KatGirl
    Member
    Posted 8 years ago #

    See your duplicate post here

    wordpress.org/support/topic/89727?replies=3

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags