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">
|
<figure class="teaser-box-image">
|
||||||
<?php if ( has_post_thumbnail() ) { ?>
|
<?php if ( has_post_thumbnail() ) { ?>
|
||||||
<img src="<?php echo get_the_post_thumbnail_url(); ?>">
|
<img src="<?php echo get_the_post_thumbnail_url(); ?>">
|
||||||
<?php } else { ?>
|
<?php } else {
|
||||||
<img src="<?php echo esc_url( get_option( 'kit_defaultimage' ) ); ?>">
|
$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 } ?>
|
<?php } ?>
|
||||||
</figure>
|
</figure>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ get_header();
|
||||||
echo esc_html( $categories[0]->name );
|
echo esc_html( $categories[0]->name );
|
||||||
} ?>
|
} ?>
|
||||||
</h2>
|
</h2>
|
||||||
|
|
||||||
<div class="tx-indexedsearch">
|
<div class="tx-indexedsearch">
|
||||||
|
|
||||||
<div class="tx-indexedsearch-browsebox">
|
<div class="tx-indexedsearch-browsebox">
|
||||||
|
|
@ -57,8 +57,11 @@ get_header();
|
||||||
<figure class="teaser-box-image">
|
<figure class="teaser-box-image">
|
||||||
<?php if ( has_post_thumbnail() ) { ?>
|
<?php if ( has_post_thumbnail() ) { ?>
|
||||||
<img src="<?php echo get_the_post_thumbnail_url(); ?>">
|
<img src="<?php echo get_the_post_thumbnail_url(); ?>">
|
||||||
<?php } else { ?>
|
<?php } else {
|
||||||
<img src="<?php echo esc_url( get_option( 'kit_defaultimage' ) ); ?>">
|
$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 } ?>
|
<?php } ?>
|
||||||
</figure>
|
</figure>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -194,15 +194,9 @@ function theme_customize_register( $wp_customize ) {
|
||||||
)
|
)
|
||||||
) );
|
) );
|
||||||
|
|
||||||
$wp_customize->add_setting( 'kit_defaultimage', array(
|
$wp_customize->add_setting( 'kit_defaultimage' );
|
||||||
'default' => '',
|
$wp_customize->add_control( new WP_Customize_Media_Control(
|
||||||
'type' => 'option',
|
$wp_customize, 'kit_defaultimage', array(
|
||||||
'capability' => 'edit_theme_options'
|
|
||||||
),
|
|
||||||
);
|
|
||||||
|
|
||||||
$wp_customize->add_control( new WP_Customize_Image_Control(
|
|
||||||
$wp_customize, 'kit_defaultimage_control', array(
|
|
||||||
'label' => __( 'Default featured image', 'kit' ),
|
'label' => __( 'Default featured image', 'kit' ),
|
||||||
'settings' => 'kit_defaultimage',
|
'settings' => 'kit_defaultimage',
|
||||||
'section' => 'title_tagline',
|
'section' => 'title_tagline',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue