Use own slider in place of header image


#1

Hallo,

I would like to use own slider in place of header images.

normally i can add this code : <?php echo do_shortcode('[metaslider id="1199"]'); ?> everywhere in the site
and it shows the images from my slider plugin.

Is there any way to add this code in the place of header.jpg ??

Best regards


#2

Hi,

What you can do is to replace the header slider code in header.php file, by default you can’t change the header image with a slider by just using a shortcode in Customizer or Theme Options.

Kind Regards,
Csaba


#3

Thnx for your feedback Csaba.

But if i replace:

<?php if ( get_header_image() ) :?>
<header id="masthead" class="site-header has-banner" role="banner">
<?php else : ?>
<header id="masthead" class="site-header" role="banner">
<?php endif; ?>

with: <?php echo do_shortcode('[metaslider id="1199"]'); ?>

It comes to the front page but it pushes the menu and logo down.
i uploaded screenshot.

any idea?

Thank you very much

best regards
Magomed


#4

Hi,

Please only add the code below the <header id="masthead" class="site-header has-banner" role="banner"> code that’s the code that shows the menu on top, so your code should be below it, not above it. If it still won’t work, please post a link to your website, so I can check what’s wrong.

Kind Regards,
Csaba


#5

Now i added it so :
<?php if ( display_header_text() ) : ?>

<?php bloginfo( 'name' ); ?>


<?php bloginfo( 'description' ); ?>


<?php endif; ?>
<?php endif; ?>
		</div>
	</div>
	**<?php echo do_shortcode('[metaslider id="1199"]'); ?>**![denderbelles|690x361]
<?php if ( is_home() ) : ?> 

Above the Slider is it ok, but i would like to have the Logo on the slider, like in your default header.

URL for the site that i’m making is : https://jochen.eurochechens.com

Best regards


#6

Hi,

That logo image is added separately, that’s why it shows separately, please add the image inside your slider, in case you can’t do that with the meta slider, then try a different slider plugin.

Kind Regards,
Csaba


#7

I found Slider with which allows me to add layer wiht png transparant logo.
so my problem is solved.

And it is solved because you gave me the right tip.

thank you very much!!!

best regards
Magomed


#8

Hi,

Great! You’re most welcome! If you need help with anything else, please open a new topic.

Have a nice day!

Kind Regards,
Csaba


#9