Slider for Page Template
  • mlivingmliving
    April 2012
    Would it be possible to get a page template that includes the slider above the navigation like the home page.

    I was under the impression that sliders could be added to any page and was surprised to find out you can not have a static image or slider above the navigation on a page.

    Just having a logo and an empty slab of colour looks terrible.
  • mikemike
    April 2012
    These are all added in the header.php file. We have an example of this in the blog-slider.php file. If you want, duplicate this code in the header.php file and create another page.php template that is like "page-slider.php" or whatever naming scheme you like.

    The called to the page templates are like so:
    <?php if(is_page_template('homepage.php') || is_page_template('blog-slider.php') || is_page_template('homepage-sidebar.php')): ?>

    We are also available for hire if you need help customizing this. Just contact is via private e-mail.
  • mlivingmliving
    April 2012
    Slider on Pages Solution

    Create a new page using the code below and name it page-slider.php

    <?php
    /*
    Template Name: Page with Slider
    */
    ?>

    <?php get_header(); ?>
    <?php while(have_posts()): the_post(); ?>
    <?php if (function_exists('progression_breadcrumbs')) progression_breadcrumbs(); ?>
    <h1><?php the_title(); ?></h1>
    <?php the_content(); ?>
    <?php endwhile; ?>

    <?php get_footer(); ?>


    Modify The Header.php File

    Add this snippet of code to the line below found in the header.php:
    || is_page_template('page-slider.php')

    <?php if(is_page_template('homepage.php') || is_page_template('blog-slider.php') || is_page_template('homepage-sidebar.php') || is_page_template('page-slider.php')): ?>