• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar

WP SITES

2299

Original Genesis Tutorials & 5000+ Code

Snippets

  • Subscribe
  • Full Access
  • Videos
  • Log in
  • Twitter
  • Facebook
  • LinkedIn
  • Email
  • More
  • Reddit
  • Tumblr
  • Google
  • Print
  • Pinterest
  • Telegram
  • Pocket
  • Skype
  • WhatsApp

Add Slider to Header in Twenty Sixteen Child Theme

This code enables you to install the Soliloquy slider to the header of the Twenty Sixteen child theme for WordPress like this:

slider-in-header

The code includes a conditional tag so the slider only displays on the first page of the front page archive and not on any paginated pages.

Video Guide

The video shows you how to install the code which displays the slider in your header template.

There’s 3 simple steps you need to take to add the slider.

  1. Make sure the Twenty Sixteen parent theme is installed and then install a child theme for Twenty Sixteen.
  2. Copy over the the header.php file from the Twenty Sixteen parent theme to the child themes root directory.
  3. Using FTP and a code editor, add the following PHP code to the header.php in the child theme.

Note: You will need to add a new slider and configure the slider settings after installing the Soliloquy plugin. Once you do that, you can then swap out the slider i.d in the codes template tag with whatever your slider generates like this:

slider-template-tag

The position you place the code in the header.php file determines where the slider displays.

The display the slider after the title and before the navigation menu, add the code immediately after the closing div for the .site-branding class on line 42 like this:

header

If you want to display your slider on all front page or home paginated pages, remove the following from the code:

|| get_query_var( 'paged' ) >= 2

If you want to display the slider sitewide, remove the following from the code:

if ( ! is_front_page() || get_query_var( 'paged' ) >= 2 )
	return;

Thats all there is to it!

Download Child Theme

The following child theme for Twenty Sixteen includes the code from this tutorial already installed in the header.php file. Simply upload and activate.

Download Twenty Sixteen Child Theme

Related Tutorials

  • Install Slider In Header of Any Theme
  • How To Make A Child Theme – Includes Video Guide
Subscribe for new Genesis Tutorials

Primary Sidebar

  • What Is WordPress
  • WordPress Installation
  • WordPress.org or WordPress.com
  • 1. Download WordPress
  • 2. Installing WordPress
  • 3. WordPress Dashboard
  • 4. WordPress Posts
  • 5. Editing Posts
  • 6. Tags & Categories
  • 7. Adding Links
  • 8. WordPress Pages
  • 9. Comments & Discussion
  • 10. Themes for WordPress
  • 11. Theme Installation
  • 12. Using Widgets
  • 13. WordPress Editor
  • 14. WordPress Plugins
  • 15. WordPress Tools
  • 16. Users Profile
  • 17. General Settings
  • 18. Writing Settings
  • 19. Reading Settings
  • 20. Discussion Settings
  • 21. Permalink Settings
  • 22. Misc Settings
  • 23. Media Settings
  • 24. Tips & Tricks
  • Membership
    • Account Subscription Details
  • Tagged by Theme
  • Blog
  • T.O.C
    • Membership F.A.Q’s
  • RSS
  • Contact
  • Newsletter ( Twice Weekly )

Usage Policy · Tools & Resources


Images, code, and content on this website are property of wpsites.net and are protected by copyright law.
WP Sites does not grant permission for any repurposing, republication, or redistribution.
"Disclosure: Some of the links in some posts are "affiliate links."
This means if you click on the link and purchase the item, I will receive an affiliate commission.
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.