Need help with adding the short code for WP Header Image Slider

I have installed WP Header Image Slider plugin and created few images.

I need to add this shortcode (<?php echo do_shortcode('[sp_imageslider'); ?>:wink: with the fade option in header.php file

I copied header.php file and added it in the child theme but it is showing an extra space on the front page. Please add it and let me know.

http://www.chelmsfordsaicenter.org

I have enabled the support access.

  • Luís
    • Support

    Hi @satyaram1123,

    Hope you're doing well today!

    I replaced the slider in the same location that you have the header image (below the menu) and didn't find any extra space.

    It can be related to the image dimensions you are using?

    Can you add the slider where you want and share the result, in order to help you better?

    Cheers, Luís

  • Luís
    • Support

    Hi @satyaram1123,

    Hope you're doing well today!

    I am afraid you will need to add the shortcode directly in the header.php file.

    In this file, you will find this piece of code:

    <div id="custom-img-header">
    <div class="custom-img-header"><a href="<?php echo home_url(); ?>"><img src="<?php header_image(); ?>" alt="<?php bloginfo('name'); ?>" /></a></div>
    </div>

    Replace it by the shortcode, something like:

    <div id="custom-img-header">
    <div class="custom-img-header">
    <?php echo do_shortcode('[sp_imageslider captions="false" effect="fade" autoplay="true" speed="2000" slide_margin="10" auto_controls="false" loop="true" start_slide="1" random_start="true" autoplay_interval="500"]'); ?>
    </div>
    </div>

    I hope this information has been helpful. If I can help you in this or other questions, please let me know!

    Cheers, Luís

  • satya
    • Site Builder, Child of Zeus

    I brought this up on online chat with Kasia Swiderska and she noticed that the plugin was broken. I uninstalled the plugin and installed Image Slider plugin. I added the shortcode but it the images are not coming up in the slider. Seems like this worked on Kasia Swiderska's machine but does not work on mine. Please check

  • Luís
    • Support

    Hi @satyaram1123,

    Hope you're doing well today!

    The space defined to the header image (where you want to place the slider) use a height = 150px.

    The images you defined to the slider are bigger (height=760px).

    I am not sure what image dimensions you want to use in the slider. If you want to use a height of 150px you will need to change the images to match this height.

    I created another slider using images with a lower dimension (150px). Try insert this slider to see that it works well.

    Cheers, Luís

  • Luís
    • Support

    Hi @satyaram1123,

    Hope you're doing well today!

    I didn't used any tool, I only used a image which existed in your media library.

    However, you can use an image editor like GIMP or Photoshop to edit before the upload to the media library.

    Also, you can use the editing tools of WordPress (it's a bit limited):

    1) Go to the media library and click in the desired image;

    2) Click in "Edit" button;

    3) It will open a pop up with some tools, like Crop, Rotate, Flip, etc.

    I hope this information has been helpful. If I can help you in this or other questions, please let me know!

    Cheers, Luís

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.