Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #160126
    hoiung
    Participant

    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.

    https://zoukdancecamp.com/

    PS. we have child theme installed if changes need to be made there.

    #160182
    sapana
    Participant

    @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,
    Sapana

    #160215
    hoiung
    Participant

    I’m comfortable with child theme customization details 🙂 could you point me to the correct file that needs to be created in the child theme?

    #160606
    sapana
    Participant

    @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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘change portfolio image size’ is closed to new replies.