fix relative url default preview image
This commit is contained in:
parent
106d12341a
commit
77c2cdffe8
3 changed files with 14 additions and 14 deletions
|
|
@ -139,8 +139,11 @@ get_header();
|
|||
<figure class="teaser-box-image">
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<img src="<?php echo get_the_post_thumbnail_url(); ?>">
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo esc_url( get_option( 'kit_defaultimage' ) ); ?>">
|
||||
<?php } else {
|
||||
$custom_logo_id = get_theme_mod( 'kit_defaultimage' );
|
||||
$logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
|
||||
?>
|
||||
<img src="<?php echo esc_url( $logo[0] ); ?>">
|
||||
<?php } ?>
|
||||
</figure>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -57,8 +57,11 @@ get_header();
|
|||
<figure class="teaser-box-image">
|
||||
<?php if ( has_post_thumbnail() ) { ?>
|
||||
<img src="<?php echo get_the_post_thumbnail_url(); ?>">
|
||||
<?php } else { ?>
|
||||
<img src="<?php echo esc_url( get_option( 'kit_defaultimage' ) ); ?>">
|
||||
<?php } else {
|
||||
$custom_logo_id = get_theme_mod( 'kit_defaultimage' );
|
||||
$logo = wp_get_attachment_image_src( $custom_logo_id , 'full' );
|
||||
?>
|
||||
<img src="<?php echo esc_url( $logo[0] ); ?>">
|
||||
<?php } ?>
|
||||
</figure>
|
||||
</a>
|
||||
|
|
|
|||
|
|
@ -194,15 +194,9 @@ function theme_customize_register( $wp_customize ) {
|
|||
)
|
||||
) );
|
||||
|
||||
$wp_customize->add_setting( 'kit_defaultimage', array(
|
||||
'default' => '',
|
||||
'type' => 'option',
|
||||
'capability' => 'edit_theme_options'
|
||||
),
|
||||
);
|
||||
|
||||
$wp_customize->add_control( new WP_Customize_Image_Control(
|
||||
$wp_customize, 'kit_defaultimage_control', array(
|
||||
$wp_customize->add_setting( 'kit_defaultimage' );
|
||||
$wp_customize->add_control( new WP_Customize_Media_Control(
|
||||
$wp_customize, 'kit_defaultimage', array(
|
||||
'label' => __( 'Default featured image', 'kit' ),
|
||||
'settings' => 'kit_defaultimage',
|
||||
'section' => 'title_tagline',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue