johannes.jarolim.com/yapb-forum

Full Version: Clickable from index
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

Guest

I'd like the yapb image to be clickable from the index page to go to the single.php page. I can't figure how to do this, help is appreciated, thanks! (using Beautiful Day 2.0)
Hi Guest -

You would have to adapt your theme manually - After doing that you may enclose your thumbnails with the following link:

Code:
<a class="yapb" href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"> ... </a>

Hope that helps and
Greets from Salzburg,

Johannes

Guest

Hi there Smile

great work, despite i am a rookie in wordpress.

I've been trying to do the same thing : displaying only a simpleview of thumbnails on the home page.

i try to make as you told about, but it did not wok.

the code of the index.php is below...

if you can help...

Code:
<?php get_header(); ?>
  <div id="content">
  
  <?php if (have_posts()) : ?>
  
      <?php while (have_posts()) : the_post(); ?>

      
  <a class="yapb" href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"> <?php if (yapb_is_photoblog_post()): ?>  
    
     <?php  
    
      echo yapb_get_thumbnail(  
         '<div>', // HTML before image tag  
        array(  
          'alt' => 'My marvelous first thumbnail', // image tag alt attribute  
          'rel' => 'lightbox'                      // image tag rel attribute  
       ),  
        '</div>',               // HTML after image tag  
         array('w=200', 'q=90'), // phpThumb configuration parameters  
        'thumbnail'             // image tag custom css class  
      );  
    
     ?>  
    
   <?php else: ?>  
     ...  
   <?php endif ?>  
. </a>





    <div class="post" id="post-<?php the_ID(); ?>">
      <div class="post-title">
      <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
        <span class="post-comments"><?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></span>
      </div>
      <div class="entry">
        <?php the_content('Click here to read more.. &raquo;'); ?>
      </div>
      <div class="posted">
                    <span class="category"><?php the_category(', ') ?></span> <span class="timed"><?php the_time('F jS Y') ?></span>  <?php edit_post_link('Edit', '', ''); ?>            
                 </div>
    </div><!--/post -->
     <div>
      </div>
    
    <?php endwhile; ?>
    
    <div class="navigation">
      <span class="previous-entries"><?php next_posts_link('Previous Entries') ?></span> <span class="next-entries"><?php previous_posts_link('Next Entries') ?></span>
    </div>
    
    <?php else : ?>
    
        <h2>Not Found</h2>
        <p>Sorry, but you are looking for something that isn't here.</p>
        
  <?php endif; ?>
    
  </div><!--Content End -->
  
<?php get_sidebar(); ?>

<?php get_footer(); ?>



Johannes Wrote:Hi Guest -

You would have to adapt your theme manually - After doing that you may enclose your thumbnails with the following link:

Code:
<a class="yapb" href="<?php echo get_permalink() ?>" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"> ... </a>

Hope that helps and
Greets from Salzburg,

Johannes
Reference URL's