Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to make area a link
#1
I have a page with a section that lists a short page description of each of it's child pages. I would like to make the individual descriptions as a large link. So that clicking any part of the child's description will take you to that child page.

Here is my code:
Code:
<div class="content col3">
                <?php $items = getChildren(return_page_slug());?>
            
                <?php foreach($items as $item): ?>    
                     <div class="col1">
                     <a href="<?php get_page_url(); ?><?php echoPageField($item, slug); ?>" >
                    <?php echoPageField($item, pagedesc); ?>
                    </a>
                    </div><!-- /col1 -->
                <?php endforeach;?>
            
                <?php get_page_content(); ?>
            
            </div><!-- /.content -->

I know I can't nest a <div> tag inside of an <a> tag so how would I make the content clickable?
Reply




Users browsing this thread: 1 Guest(s)