Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #295

    Is it possible to have the “preview_pic_mainpage” images on the home page to be linked to separate pages? At present they are not linkable nor do I see where I can enter a link via custom field. The client I’m working with would like to have each image take the user to the appropriate page on his site.

    I would have no problem editing coding, but I’m not sure what I should add to allow this function.

    Site Address:

    Thank you.



    you can add those links with the help of custom fields:

    create a new custom field for each of these posts in your wordpress backend, lets call it “link” and as value ad the complete link URL

    open index.php and add the following at line 45:

    $link = get_post_meta($post->ID, "link", true);

    the link URI now is stored within the $link var.

    now change the following code block as described here:


    The coding functioned. However, I’m holding off on implementing it for now because it created a black border around the images. Thanks for your help.



    this should remove the border:

    .box_image a img, .box_image a{





    The CSS you provided worked like a charm! You can see the updated & working links on the home page at:

    Thanks again!


    Two Rivers Multimedia



    Awesome, marking as resolved and closing topic. If you have any other questions please open a new topic.

    Best regards,


Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Setting a link for the "preview_pic_mainpage" custom field’ is closed to new replies.