Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #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: http://at-the-well.net/site/

    Thank you.

    Paul

    #30701

    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:

    http://pastie.org/1059352

    #30702

    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.

    #30703

    Hi!

    this should remove the border:


    .box_image a img, .box_image a{
    border:none;
    }

    Regards,

    Kriesi

    #30704

    Kriesi,

    The CSS you provided worked like a charm! You can see the updated & working links on the home page at: http://at-the-well.net/site/

    Thanks again!

    Paul

    Two Rivers Multimedia

    http://www.tworiversmultimedia.com

    #30705

    Hey!

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

    Best regards,

    James

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.