• Resolved jongraphs

    (@jongraphs)


    Hello all,
    Does anyone know the PHP function in the “default” wordpress theme that handles pictures and how they are displayed? I want to make it so that when a picture is clicked on, it opens in a separate window. If someone already knows the PHP code for doing this, I would appreciate that as well. Thanks.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter jongraphs

    (@jongraphs)

    unresolved

    Thread Starter jongraphs

    (@jongraphs)

    ^^^^^^^^^^ Maybe whoever’s deleting my posts has the answer

    Your posts might have been deleted for excessive bumping. Not sure.

    Anyway, there is no PHP code to display images, images are shown and linked to via HTML code. There might be a PHP function somewhere that creates and echoes said HTML string, but it depends on the context.

    Is the image part of a post? Add a “target=_new” to the <a href=. There’s even a target dropdown in the ‘edit/insert link’ dialog.

    Is the image part of a WordPress gallery? WordPress calls wp_get_attachment_link() to populate the list. AFAIK there’s no parameter to specify the target, you’d have to change the function to handle that parameter.

    Thread Starter jongraphs

    (@jongraphs)

    Thanks. That did the trick. You’re great!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP function that handles pictures?’ is closed to new replies.