HELP <?php the_content(); ?>

Discussion in 'PHP' started by M3GATRON, Aug 30, 2014.

  1. #1
    using wordpress. i have clickable images in post but i want to open that images in new tab like if some user click on that image it must be open in new tab

    <div class="postmeta"> Category : <?php the_category(' &bull; ') ?> </div>
                         <hr style="height:2px;margin-top:0px;margin-bottom:5px;" />   
                            text text text text a</b>
                              <?php the_content();?>
                            <p><b>click to view<?php the_title(); ?> this image </b>
    PHP:
    code in red is image content how can i open that in new tab i tried <a target="_blank"> but it's not working
     
    M3GATRON, Aug 30, 2014 IP
  2. sarahk

    sarahk iTamer Staff

    Messages:
    28,897
    Likes Received:
    4,553
    Best Answers:
    123
    Trophy Points:
    665
    #2
    At the time that you write the post and insert the image you get to specify if you want it to open in a new tab or not.

    There is, no doubt, a plugin that can groom the_content so that all image links have the right target.

    So... your ideas were right, but you are implementing them in the wrong place.
     
    sarahk, Aug 31, 2014 IP
  3. M3GATRON

    M3GATRON Member

    Messages:
    38
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    26
    #3
    Actually i'm not getting that default option to open image in new tab so i tried to add "_blank" code but its not working (check here highwallpaper dowtcom)
    i also tried some plugins but it's not working on images
     
    M3GATRON, Aug 31, 2014 IP