Show site banner plus posts slideshow

Home Forums Receptar Show site banner plus posts slideshow

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #21168

    nisaanwaar
    Participant

    Show site banner plus posts slideshow

    Resolved

    Hey there! Have you noticed this support service is provided FREE of charge?
    If you like the speed and accuracy of resolutions, please consider supporting me with a small donation. Thank you

    Consider a donation →

    I have a special post which i want to highlight on homepage and want to display it in slideshow. But enabling slideshow disables hoempage default banner and only shows posts images. Is there any way i can show default banner first and then the slideshow of posts starts?

    #21169

    Oliver Juhas
    Keymaster

    Hi nisaanwaar,

    You can add a custom first banner/slide into the slideshow using this code in your child theme‘s functions.php file:

    function child_theme_first_slide() {
    	?>
    	<article class="entry">
    		<div class="site-banner-media">
    			<figure class="site-banner-thumbnail"><?php the_header_image_tag(); ?></figure>
    		</div>
    		<div class="site-banner-header">
    			<h1 class="entry-title"><span class="highlight"><?php bloginfo( 'description' ); ?></span></h1>
    		</div>
    	</article>
    	<?php
    }
    add_action( 'wmhook_banner_content_top', 'child_theme_first_slide' );

    Of course, adapt the code to your needs: replace <?php the_header_image_tag(); ?> with your custom HTML image tag, replace <?php bloginfo( 'description' ); ?> with your custom text if needed.

    Best regards,

    Oliver Juhas
    WebMan Design

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.