mirror of
https://github.com/WordPress/five-for-the-future.git
synced 2025-07-04 18:05:45 +03:00
Add a custom image size for the logo
This commit is contained in:
parent
407dcc8d22
commit
6113ce0c7f
3 changed files with 13 additions and 3 deletions
|
@ -37,7 +37,9 @@ function setup() {
|
||||||
|
|
||||||
add_theme_support( 'wp-block-styles' );
|
add_theme_support( 'wp-block-styles' );
|
||||||
add_theme_support( 'editor-styles' );
|
add_theme_support( 'editor-styles' );
|
||||||
|
|
||||||
add_theme_support( 'post-thumbnails' );
|
add_theme_support( 'post-thumbnails' );
|
||||||
|
add_image_size( 'pledge-logo', 660, 200 );
|
||||||
|
|
||||||
add_editor_style( 'css/style-editor.css' );
|
add_editor_style( 'css/style-editor.css' );
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,15 @@ get_header(); ?>
|
||||||
?>
|
?>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<?php the_post_thumbnail( array( 288, 288 ) ); ?>
|
<div class="entry-image">
|
||||||
|
<?php if ( has_post_thumbnail() ) : ?>
|
||||||
|
<div class="entry-image__logo">
|
||||||
|
<?php the_post_thumbnail( 'pledge-logo' ); ?>
|
||||||
|
</div>
|
||||||
|
<?php else : ?>
|
||||||
|
<div class="entry-image__placeholder"></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div><!-- .entry-image -->
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="entry-content">
|
<div class="entry-content">
|
||||||
|
|
|
@ -32,12 +32,12 @@ $contributor_title = sprintf(
|
||||||
<div class="entry-image">
|
<div class="entry-image">
|
||||||
<?php if ( has_post_thumbnail() ) : ?>
|
<?php if ( has_post_thumbnail() ) : ?>
|
||||||
<div class="entry-image__logo">
|
<div class="entry-image__logo">
|
||||||
<?php the_post_thumbnail(); ?>
|
<?php the_post_thumbnail( 'pledge-logo' ); ?>
|
||||||
</div>
|
</div>
|
||||||
<?php else : ?>
|
<?php else : ?>
|
||||||
<div class="entry-image__placeholder"></div>
|
<div class="entry-image__placeholder"></div>
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</div><!-- .post-thumbnail -->
|
</div><!-- .entry-image -->
|
||||||
|
|
||||||
<header class="entry-header">
|
<header class="entry-header">
|
||||||
<?php if ( is_singular() ) : ?>
|
<?php if ( is_singular() ) : ?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue