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

WP SITES

2665

Original Genesis Tutorials & 5000+ Guaranteed Code

Snippets

  • Support
  • Newsletter
  • Videos
  • Log in

Premium Member? - Request custom code

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

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

Recent Posts

  • Checkbox to Remove Specific Posts & Pages From Your Home Page Loop
  • Menu Logo Menu Using CSS Grid In New Versions of Genesis Sample Theme
  • Featured Posts With Pagination In Widget Area Using Business Pro
  • How To Translate the Property Details Additional Features Text In AgentPress Pro
  • Unlink All Archive Links For Each Entry On Per Post Basis

Advertise · WPEngine · Genesis · Log in

  • How Premium Membership Works
  • Sign Up
  • Support
  • Subscription Details/Invoice
  • Tagged Tutorials
  • Access-Download Problems