0

Hello I am using the Boldy theme for my Wordpress website. I have a problem with the boxes (all 3 of them). All these three boxes have a "read more" that takes the user to another page, and above these boxes there is a small image.

Now I want the images for each box to take the user to another page as well, but how can you make each image to turn them into a link in wordpress?

Here is my home.php this might help.

<?php get_header(); ?>

    <!-- BEGIN SLIDER -->

      <div id="slider">

            <?php if(get_option('boldy_slider')!=''){

            $page_data = get_page(get_option('boldy_slider'));

                    $content = $page_data->post_content;

                    echo $page_data->post_content;

            }else{?>

                <div style="border:1px solid #ddd; text-align:center; padding:150px 100px 0; height:219px; font-size:14px;">

                    This is the slider. In order to have items here you need to create a page in which to insert the images, simply one after another, setting up the link to point at ( if needed ) and text captions in the Title field. Then select the page as the "slider page" in the Theme Options Page. Make sure your images are 960px x 370px.

                </div>

            <?php }?>

        </div>

       <div style="width:960px; margin:0 auto; background:url(<?php bloginfo('template_directory'); ?>/images/bk_shadow_slider.png) 0 0 no-repeat; height:50px;"></div>

       <!-- END SLIDER -->

       <!-- BEGIN BLURB -->

       <?php if(get_option('boldy_blurb_enable')=="yes" && get_option('boldy_blurb_text')!=""){ ?>

       <div id="blurb">

            <p>

            <a href="<?php 

            if(get_option('boldy_blurb_page')!=""){

                echo get_permalink(get_option('boldy_blurb_page'));

            }elseif(get_option('boldy_blurb_link')!=""){

                echo get_option('boldy_blurb_link');

            } ?>"><img src="<?php bloginfo('template_directory'); ?>/images/but_blurb.png" alt="" /></a>

            <?php echo get_option('boldy_blurb_text'); ?> 

            </p>

       </div>

       <?php }?>

       <!-- END BLURB -->

       <!-- BEGIN HOME CONTENT -->

       <!-- begin home boxes -->

        <?php $box1=get_post(get_option('boldy_home_box1'));

                  $box2=get_post(get_option('boldy_home_box2'));

                  $box3=get_post(get_option('boldy_home_box3')); 

                  if(get_option('boldy_home_box1')!= null && get_option('boldy_home_box2')!= null && get_option('boldy_home_box3')!= null){?>

        <div id="homeBoxes" class="clearfix">

            <div class="homeBox">

                <h2><?php echo $box1->post_title?></h2>

                <?php echo apply_filters('the_content', $box1->post_content);?>

                <a href="<?php echo get_option('boldy_home_box1_link')?>"><strong>Read more &raquo;</strong></a>

            </div>

            <div class="homeBox">

                <h2><?php echo $box2->post_title?></h2>

                <?php echo apply_filters('the_content', $box2->post_content);?>

                <a href="<?php echo get_option('boldy_home_box2_link')?>"><strong>Read more &raquo;</strong></a>

            </div>

            <div class="homeBox last">

                <h2><?php echo $box3->post_title?></h2>

                <?php echo apply_filters('the_content', $box3->post_content);?>

                <a href="<?php echo get_option('boldy_home_box3_link')?>"><strong>Read more &raquo;</strong></a>

            </div>

        </div>
3
  • 1
    Did you create a page/post for each of these images? Commented Jan 25, 2012 at 12:18
  • @ Stephen Harris: I create a page for all three images - so yes.
    – Shehzad009
    Commented Jan 25, 2012 at 12:30
  • @ Stephen Harris: Oh I see. go to pages, edit the pages you want to edit. Then select your image and go to insert/edit link and assign a url. Thanks
    – Shehzad009
    Commented Jan 25, 2012 at 12:37

1 Answer 1

0

The images are produced by simply displaying the content of the pages you created for each, box.

Go to each of theses pages, click the image. On the top-left corner of the image two icons should appear. Click the edit icon (the leftmost icon).

A dialog window will pop-up, which will allow you to edit the properties of the image (title, caption etc). Among this is 'link url' - change this to wherever you would like the image to link to. Click update. And then finally update the page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.