Home Page + Slider issue

  • Anonymous

    #382

    Hi,

    Hi, thanks for the theme, its great!

    I am trying to add a custom image slider (nivo slider) to my home page. My home page is not static, it pulls in all the posts and content from the other categories.

    I want it to add this image slider feature in the main content area, just before the posts are shown on the home page.

    I only want this slider on the home page.

    I tried to edit a few PHP files, such as loop etc, but I could not get this slider to only appear above the content on the home page.

    Can you please help me and tell me where I need to put the code to get this slider on the home page please?

    zola

    #12312

    My code on the index.php file :

    ‘<?php

    /**

    * The main template file.

    *

    * This is the most generic template file in a WordPress theme

    * and one of the two required files for a theme (the other being style.css).

    * It is used to display a page when nothing more specific matches a query.

    * E.g., it puts together the home page when no home.php file exists.

    * Learn more: http://codex.wordpress.org/Template_Hierarchy

    *

    * @package WordPress

    * @subpackage Graphene

    * @since Graphene 1.0

    */

    get_header(); ?>

    <div>

    <div class=”nivoSlider” style=”height: 400px; width: 600px;”>

    ASIWYFA

    BUILDINGS

    Dudes</div>

    </div>

    <?php

    /* Run the loop to output the posts.

    * If you want to overload this in a child theme then include a file

    * called loop-index.php and that will be used instead.

    */

    get_template_part(‘loop’, ‘index’);

    ?>

    <?php get_sidebar(); ?>

    <?php get_footer(); ?>’

    Admin

    Syahir Hakim

    #12313

    Add this code before the slider:

    <?php if (is_front_page()) : ?>

    and this code after the slider:

    <?php endif; ?>

    Chinkerfly

    #12314

    I’ve tried inserting this code you have here before and after the “function_slider” div in the functions.php file, but maybe that’s not the right place to put it? I’m trying to set it up so that the slider does not appear on the search results page. http://www.sosmap.org

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.