Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * Template for Featured Image in Archive Content
- *
- * @override function from child theme
- */
- function clean_journal_archive_content_image() {
- $options = clean_journal_get_theme_options();
- $featured_image = $options['content_layout'];
- if ( has_post_thumbnail() && 'full-content' != $featured_image ) { ?>
- <figure class="featured-image">
- <a rel="bookmark" href="<?php the_permalink(); ?>">
- <?php
- if ( 'excerpt-image-left' == $featured_image || 'excerpt-image-right' == $featured_image ) {
- the_post_thumbnail( 'clean-journal-square' );
- }
- elseif ( 'excerpt-image-top' == $featured_image ) {
- the_post_thumbnail( 'clean-journal-featured' );
- }
- elseif ( 'excerpt-full-image' == $featured_image ) {
- the_post_thumbnail( 'full' );
- }
- ?>
- </a>
- </figure>
- <?php
- }
- }
- /**
- * Add new image size
- */
- function clean_journal_child_add_image_size() {
- add_image_size( 'clean-journal-square', 250, 250, true );
- }
- add_action( 'after_setup_theme', 'clean_journal_child_add_image_size' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement