• Hi all

    On my newly revamped photo folio site I decided to use Gridly. I really like the look of the front page and it suits the way I want to present my photography (https://f5.fluxink.com). I have made several mods to the template to customise it for my purposes. But there is one thing I can not work out. I have a Fancybox plugin which is great, I would like to change the featured image thumbnail link from taking me to the post into a link that would open the image in full size in the fancybox. But also leave the title to guide the user to the post page if they choose.
    Now I tried changing the class in the a href of the index php successfully to fancybox, but this popped the whole post in a pop up.

    Can anyone tell me what to write and where to make the featured image pop up when clicked showing the original size image file?

    This was the simple mod I did that worked to an extent as mentioned above:

    <div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		 <?php if ( has_post_thumbnail() ) { ?>
             <div class="gridly-image"><a>"><?php the_post_thumbnail ( 'summary-image' );  ?></a></div>
    
    		  <?php } ?>
           			<div class="gridly-copy"><h2><a>"><?php the_title(); ?></a></h2>

    [Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m sorry but as you appear to be using a non-WPORG theme, you need to seek support from the theme’s developers – paid or otherwise. We only support themes downloaded from www.remarpro.com here.

    Thread Starter Vishy Moghan

    (@vishy-moghan)

    Hi

    I wasn’t really asking for support for the theme per se. I just wanted some technical help as to how to link the featured thumbnail to the full sized image file instead of the post. I don’t think that has anything to do with what theme I’m using since the principal factor at play is the WP base code.

    This kind of help is highly theme-specific. As we do not have access to the theme, we cannot help you here.

    Thread Starter Vishy Moghan

    (@vishy-moghan)

    OK I’m gonna post this for anyone else who is trying to puzzle this out. In fact unlike esmi’s comment, this proved to be a solution available on WP knowledge bases and documentation, as I had thought…

    So for anyone using Gridly who wants the blog page featured images to pop up to full size this is the modification I made to the index.php to achieve this.

    <?php get_header(); ?>
    
    <?php if (have_posts()) : ?>
    <div id="post-area">
    <?php while (have_posts()) : the_post(); ?>	
    
       		<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    		<?php if ( has_post_thumbnail() ) { ?>
             <div class="gridly-image"><?php $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large');
       echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >';
       the_post_thumbnail( 'summary-image' );
       echo '</a>'; ?></div>
              <!--  <div class="gridly-category"><p><?php the_category(', ') ?></p></div> -->
    
    		  <?php } ?>
           			<div class="gridly-copy"><h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
                   <!--  <p class="gridly-date"><?php the_time(get_option('date_format')); ?>  </p> -->
    
    <?php the_excerpt(); ?> 
    
                  <!--  <p class="gridly-link"><a href="<?php the_permalink() ?>">View more &rarr;</a></p> -->
             </div>
           </div>
    
    <?php endwhile; ?>
    </div>
    <?php else : ?>
    <?php endif; ?>
    
    	<?php next_posts_link('<h1 class="view-older" title="See More">SEE MORE</h1>') ?>
    
    <?php get_footer(); ?>

    If you go to my site (still under construction as I tweak it more) https://f5.fluxink.com.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Making the featured image link to original jpeg file’ is closed to new replies.