Support community for TTG plugins and products.
NOTICE
The Turning Gate's Community has moved to a new home, at https://discourse.theturninggate.net.
This forum is now closed, and exists here as a read-only archive.
You are not logged in.
Pages: 1
Hello folks,
I am migrating my whole page from ce2 to ce4... what a big step! I had in ce2 a link (with a custom field called galerie) witch allowed by clicking on the main image in a single post to jump to a given side... it was implemented like that in the-loop:
<?php if ( has_post_thumbnail() ) : ?>
<a href="<?php echo get_post_meta($post->ID, 'galerie', true) ?>" title="<?php the_title_attribute(); ?>" class="post-image-link">
<?php the_post_thumbnail( 'large', array('class' => 'post-image') ); ?>
</a>
<?php endif; ?>
Now in CE4 things are changed (and much more sophisticated and also complicated). Have anyone of you in the net an idea, where I have to put now the code to obtain a similar result (link to a given gallery)?
Thanks in advance
Fabian
www.imagepower.ch
Offline
I found a solution and post it her for your information:
Search the DIV of post-featured-image and replace the code with this:
<div id="post-<?php the_ID(); ?>-featured-image" class="post-featured-image collapse_top" style="max-width:<?php echo $imgwidth; ?>px;">
<a href="<?php echo get_post_meta($post->ID, 'galerie', true) ?>" title="<?php the_title_attribute(); ?>" class="post-image-link">
<?php the_post_thumbnail( 'large', array('class' => 'size-large post_thumbnail ' . of_get_option('hd_image_class'), 'width' => $imgwidth, 'height' => $imgheight, 'data-full-rendition' => $img_full[0]) ); ?>
</a>
</div><!-- .post-featured-image -->
So you can use a custom field to submit the URL of a gallery!
Fabian
Offline
Pages: 1