Tagged: x
-
AuthorPosts
-
October 3, 2016 at 8:53 am #1200478
Magik WebParticipantCan the Portfolio use a specific image for the thumbnail and a different one for the content page?
In exemple, we’re trying to have the Portfolio list client logos and each item have a preview of their website.
Logo: 268×28
Website preview: 1170xVARThe only idea we’ve had so far is to customize the template file by hardcoding a PHP switch that goes: If this client, this image (times the amount of clients).
Is there a more a refined way?
https://magikweb.ca/clients
Thank you!October 3, 2016 at 9:48 am #1200530
RahulModeratorHey There,
Thanks for writing in!
Yes, it is actually possible to use a different images for the thumbnail and content page. Kindly walk-through this thread and follow the given guidelines there :
Let us know how this goes!
October 3, 2016 at 2:36 pm #1200923
Magik WebParticipantThank you Rahul!
It’s slightly difficult to follow since all the URLs are now 404 error pages.
I understand that the featured image can be hidden with CSS, but how is it replaced by a different image?October 3, 2016 at 7:48 pm #1201315
FriechModeratorHi There,
Sorry, I’m not sure what do you mean by this: If this client, this image (times the amount of clients).
Anyways, you can copy the file /x/framework/views/integrity/content-portfolio.php to your child theme’s /x-child/framework/views/integrity/ directory and modified that file to achieve your needs. Regretfully, this would be outside the scope of support we can offer.
Or you can add the larger image as content, and hide the small (featured) image with this custom CSS
.single-x-portfolio .entry-featured {display: none;}Thanks.
October 4, 2016 at 9:29 am #1202006
Magik WebParticipantHello Friech,
I attached two files to visualize what we’re trying to do.In other words, we want to keep the Portfolio listing the same, but when you click an item, instead of showing the featured image, we show a different one at its place.
If the attached files didn’t work like previously:
Listing: https://magikweb.ca/download/hotlink/thumbnails.png
Item: https://magikweb.ca/download/hotlink/item.pngThank you for your patience, your help is greatly appreciated!
October 4, 2016 at 5:11 pm #1202586
FriechModeratorHi There,
So putting the alternate feature image as a content is not an option? If so, please install the ACF Pro extension from the Addons panel. After a successful installation and activating the plugin, navigate to Custom Fields > Tools. Download and import this Field Groups.
Then on your child theme, navigate to this directory \x-child\framework\views\integrity\ create a file named content-portfolio.php and paste the code below on it, then save.
<?php // ============================================================================= // VIEWS/INTEGRITY/CONTENT-PORTFOLIO.PHP // ----------------------------------------------------------------------------- // Portfolio post output for Integrity. // ============================================================================= $archive_share = x_get_option( 'x_integrity_portfolio_archive_post_sharing_enable' ); ?> <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>> <div class="entry-featured"> <?php if ( is_single () ) : ?> <img src="<?php the_field('alternate_feature_image'); ?>" class="attachment-entry-fullwidth size-entry-fullwidth wp-post-image" /> <?php else : ?> <?php x_portfolio_item_featured_content(); ?> <?php endif; ?> </div> <div class="entry-wrap cf"> <?php if ( x_is_portfolio_item() ) : ?> <div class="entry-info"> <header class="entry-header"> <h1 class="entry-title entry-title-portfolio"><?php the_title(); ?></h1> <?php x_integrity_entry_meta(); ?> </header> <?php x_get_view( 'global', '_content', 'the-content' ); ?> </div> <div class="entry-extra"> <?php x_portfolio_item_tags(); ?> <?php x_portfolio_item_project_link(); ?> <?php x_portfolio_item_social(); ?> </div> <?php else : ?> <header class="entry-header"> <h2 class="entry-title entry-title-portfolio"> <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php x_the_alternate_title(); ?></a> </h2> <?php if ( $archive_share == '1' ) : ?> <?php x_portfolio_item_social(); ?> <?php endif; ?> </header> <?php endif; ?> </div> </article>If done successfully, a new meta box above the Featured Image should show.
Let us know how it goes.
Cheers!
October 5, 2016 at 10:36 am #1203570
Magik WebParticipantYes!! I apologize for being unclear. This solution is exactly what we needed, thank you very much!
October 5, 2016 at 11:09 am #1203628
ThaiModeratorYou’re most welcome 🙂
If you need anything else please let us know.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1200478 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>

