• Resolved w3skillz

    (@w3skillz)


    Hello everyone, am very glad to be joining this community. Although am very new to WordPress, i seek for more understanding and knowledge from this resourceful community.

    I’m facing some trouble right now with wowslider on my website (Cordillera Theme), I inserted the php short code in the header.php, the slider displayed just as i intended, yet, it displays also on every page i’ve created. I really need to remove the slider from other pages.
    I also want to add, after adding the “home” as the static home page, i keep having “Uncategorized
    HELLO WORLD!
    JUN 01, 2015ADMINNO COMMENTS YETEDIT
    Welcome to WordPress. This is your first post. Edit or delete it, then start blogging!

    Read More>>” only on the homepage… please how do i remove this..

    here is link to the screenshot https://s29.postimg.org/q5rqm5dhj/peeja.png

    thank you very much
    My appreciation is without bounds as i look forward for some help here…

Viewing 7 replies - 1 through 7 (of 7 total)
  • I inserted the php short code in the header.php, the slider displayed just as i intended, yet, it displays also on every page i’ve created.

    what code exactly have you inserted into header.php?

    you might need to wrap that code into a conditional statement based on is_front_page() https://codex.www.ads-software.com/Function_Reference/is_front_page

    example:

    <?php if( is_front_page() ) { ?>
    YOUR CODE
    <?php } ?>

    re post on front:

    the theme uses a front-page.php template, which checks some theme option settings – have you checked all theme options in the dashboard to not show posts on the front?

    for more help. please post in your theme’s forum at https://www.ads-software.com/support/theme/cordillera#postform

    Thread Starter w3skillz

    (@w3skillz)

    I really appreciate your reply… I pasted the wowslider short code in the header.php…. yes there is a front_page.php. Should i remove this code below the <?php if( is_front_page() ) { ?>

    $class = “homepage”;
    $banner = cordillera_get_banner($home_banner_type);
    }
    else
    {
    $class = “sitepage”;
    }

    ?>
    <body <?php body_class($class); ?>>

    <?php echo $banner; ?>

    <header id=”header”>
    <div class=”container”>
    <div class=”logo-box text-left”>
    <?php if ( cordillera_options_array(‘logo’)) { ?>
    “>
    <img src=”<?php echo esc_url( cordillera_options_array(‘logo’) ); ?>” class=”site-logo” alt=”<?php bloginfo(‘name’); ?>” />

    and replace with the wowslider short code?

    Should i remove this code below the <?php if( is_front_page() ) { ?>

    NO

    where is the slider code in the header.php template?

    can you post the full code section?

    regarding any posts on the front page, have you checked the theme options?

    please post in https://www.ads-software.com/support/theme/cordillera#postform to get clarifacation with that question.

    Thread Starter w3skillz

    (@w3skillz)

    Again thank you for your response. Below is the full header.php code. The wowslider code is immediately after the <?php wp_head();?> code, before the head closing tag… Please i really appreciate your help. I’ve been to the link you provided, i couldn’t get any help.

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
    <head>
    <meta name=”viewport” content=”width=device-width, initial-scale=1.0″ />
    <meta charset=”<?php bloginfo( ‘charset’ ); ?>” />
    <?php wp_head();?>
    <?php wowslider(2); ?>
    </head>
    <?php
    global $enable_home_page;
    $banner = “”;
    $home_banner_type = cordillera_options_array(“home_banner_type”,1);
    $enable_home_page = cordillera_options_array(“enable_home_page”);
    if( is_front_page() ){
    $class = “homepage”;
    $banner = cordillera_get_banner($home_banner_type);
    }
    else
    {
    $class = “sitepage”;
    }

    ?>
    <body <?php body_class($class); ?>>

    <?php echo $banner; ?>

    <header id=”header”>
    <div class=”container”>
    <div class=”logo-box text-left”>
    <?php if ( cordillera_options_array(‘logo’)) { ?>
    “>
    <img src=”<?php echo esc_url( cordillera_options_array(‘logo’) ); ?>” class=”site-logo” alt=”<?php bloginfo(‘name’); ?>” />

    <?php } else{?>

    <div class=”name-box”>
    <?php if ( ‘blank’ != get_header_textcolor() && ” != get_header_textcolor() ){?>
    “><h1 class=”site-name”><?php bloginfo(‘name’); ?></h1>
    <span class=”site-tagline”><?php echo get_bloginfo( ‘description’ );?></span>
    <?php }?>
    </div>
    <?php }?>
    </div>
    <button class=”site-nav-toggle”>
    <span class=”sr-only”><?php _e(“Toggle navigation”,”cordillera”);?></span>
    <i class=”fa fa-bars fa-2x”></i>
    </button>
    <nav class=”site-nav” role=”navigation”>
    <?php
    wp_nav_menu(array(‘theme_location’=>’primary’,’depth’=>0,’fallback_cb’ =>false,’container’=>”,’container_class’=>’main-menu’,’menu_id’=>’menu-main’,’menu_class’=>’main-nav’,’link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’,’items_wrap’=> ‘<ul id=”%1$s” class=”%2$s”>%3$s <li class=”main-search-item”>

    <i class=”fa fa-search site-search-toggle”></i>

    ‘.get_search_form().’
    ‘));
    ?>
    </nav>
    </div>
    </header>
    <div class=”sticky-header”>

    <div class=”container”>
    <div class=”logo-box text-left”>
    <div class=”name-box”>
    <?php if ( ‘blank’ != get_header_textcolor() && ” != get_header_textcolor() ){?>
    “><h1 class=”site-name”><?php bloginfo(‘name’); ?></h1>
    <?php }?>
    </div>

    </div>
    <button class=”site-nav-toggle”>
    <span class=”sr-only”><?php _e(“Toggle navigation”,”cordillera”);?></span>
    <i class=”fa fa-bars fa-2x”></i>
    </button>
    <nav class=”site-nav” role=”navigation”>
    <?php
    wp_nav_menu(array(‘theme_location’=>’primary’,’depth’=>0,’fallback_cb’ =>false,’container’=>”,’container_class’=>’main-menu’,’menu_id’=>’menu-main’,’menu_class’=>’main-nav’,’link_before’ => ‘<span>’, ‘link_after’ => ‘</span>’,’items_wrap’=> ‘<ul id=”%1$s” class=”%2$s”>%3$s <li class=”main-search-item”>

    <i class=”fa fa-search site-search-toggle”></i>

    ‘.get_search_form().’
    ‘));
    ?>
    </nav>
    </div>
    </div>

    Thread Starter w3skillz

    (@w3skillz)

    I only want the code to appear only on my homepage. I’ve taken the screenshot of my dashboard showing the template column… please check through this link https://www.sendspace.com/filegroup/GegnAq%2FfsiQq7pREfIIp5cMvgutfIQJM … How do i procceed please… Am grateful.

    move this line:

    <?php wowslider(2); ?>

    to a location after:

    <body <?php body_class($class); ?>>

    and change it to:

    <?php if( is_front_page() ) wowslider(2); ?>

    Thread Starter w3skillz

    (@w3skillz)

    wow! i just did it just as you stated, and it worked smoothly… i really appreciate your help… Thanks a alot…

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘I need slider to show only on Home Page – Cordillera Theme’ is closed to new replies.