- This topic has 3 replies, 2 voices, and was last updated 5 years, 4 months ago by sapana.
-
AuthorPosts
-
November 26, 2018 at 8:15 am #160126hoiungParticipant
Hey guys!
How do I change the portfolio image size 640px x 480px
to
1200 x 628 (1.91:1) – we want to make it more facebook share friendly.
PS. we have child theme installed if changes need to be made there.
November 27, 2018 at 12:17 am #160182sapanaParticipant@hoiung: Changes need to be made on child theme as well as you will need to fix the styles which is a bit complicated let me know if you are comfortable with child theme customization in detail. Otherwise I suggest you to hire a customizer.
Kind Regards,
SapanaNovember 27, 2018 at 4:49 am #160215hoiungParticipantI’m comfortable with child theme customization details 🙂 could you point me to the correct file that needs to be created in the child theme?
December 3, 2018 at 2:18 am #160606sapanaParticipant@hoiung: Sorry for the late reply, Go to => Child Theme Folder => functions.php and add the code in this link
add_image_size( 'adonis-portfolio', 1200 , 680 );
Go to=> child theme=> Create Template-parts folder=> Create portfolio folder and add the following CSS code
<?php /** * The template used for displaying projects on index view * * @package Adonis */ ?> <article id="portfolio-post-<?php the_ID(); ?>" <?php post_class(); ?>> <a title="<?php the_title_attribute(); ?>" href="<?php the_permalink(); ?>"> <div class="porfolio-section-thumbnail post-thumbnail"> <?php // Output the featured image. if ( has_post_thumbnail() ) { $thumbnail = 'adonis-portfolio'; the_post_thumbnail( $thumbnail ); } else { echo '<img src="' . trailingslashit( esc_url( get_template_directory_uri() ) ) . 'assets/images/no-thumb-640x480.jpg"/>'; } ?> </div><!-- .portfolio-content-image --> <div class="entry-container caption"> <header class="entry-header vcenter"> <?php the_title( '<h2 class="entry-title">', '</h2>' ); ?> </header> </div><!-- .entry-container --> </a> </article>
Let me know if this works out!
Kind Regards,
Sapana -
AuthorPosts
- The topic ‘change portfolio image size’ is closed to new replies.