• Hi

    I know this is pretty simple but it is so hard to find an answer as I am new to php. I placed an image in my homepage with the intention of linking it to one of my pages.
    here is the code I used to put the image on the spot I wanted but I have been searching for a way for hours to link it to one of my pages and I haven’t came across a right answer.

    <img src=”<?php bloginfo(‘template_directory’); ?>/scripts/timthumb.php?src=/thumbs/1/1.jpg&h=150&w=150&zc=1″ alt=”” />

    Anyone’s help is highly appreciated

    Thanks ??
    Carl

Viewing 5 replies - 1 through 5 (of 5 total)
  • <a href="/my_page_name"> <img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=/thumbs/1/1.jpg&h=150&w=150&zc=1" alt="" /> </a>

    darn it messed up sorry, its < a href=your site> <img src=your image>

    Thread Starter carl73a

    (@carl73a)

    Hi stvwlf,

    The page I want to link to the image is named Featured Gallery and it carries id# 276. Should I replace the “my_page_name” with the name of the page or ID.

    Actually this is what I am trying to do:
    I added a page and named it Featured Gallery and used nextgen plugin to organize photos. This page’s id is 276.
    And then I added an image in one of the empty blocks I added in the home/index page.

    I want to link this image to page id 276, so that when viewers
    clicked on the image, they would be taken to the page id 276 or featured gallery.

    Thanks in advance

    you can use

    <a href="<?php echo get_permalink(276); ?>"><img src="<?php bloginfo('template_directory'); ?>/scripts/timthumb.php?src=/thumbs/1/1.jpg&h=150&w=150&zc=1" alt="" /></a>

    Thread Starter carl73a

    (@carl73a)

    Hi stvwlf,

    Thanks alot. That’s exactly what I was looking for.
    2 thumbs up for you…

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Linking an image to a specific page’ is closed to new replies.