Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 74297

Slider developed under wordpress theme is not working

$
0
0

Currently I am developing my first theme in wordpress by converting html. In my front page (front-page.php in wordpress) there is a slide. It was finely working with html. But when I place it in the front-page.php and styles on style.css in my currently developing theme folder it is looks like this.

Slider

Here is my code

front-page.php (only slider part)

<!-- Slider -->
    <section class="slider pull-left width-wide clear-both">
        <div class="wrap">
            <div class="cont">
                <div class="slide" style="background-image:url(http://localhost:8080/Towing/wp-content/uploads/2019/12/slide1.jpg);"></div>
                <div class="slide" style="background-image:url(http://localhost:8080/Towing/wp-content/uploads/2019/12/slide2.jpg);"></div>
                <div class="slide" style="background-image:url(http://localhost:8080/Towing/wp-content/uploads/2019/12/slide3.jpg);"></div>
                <div class="slide" style="background-image:url(http://localhost:8080/Towing/wp-content/uploads/2019/12/001.png);"></div>
            </div>
            <div id="nav" style="font-size:16px;" class="pull-right">
        </div>
    </section><!-- // Slider -->

style.css

 .slider {
    position:relative;
    z-index:90
}
.slider .wrap {
    max-width:1175px !important
}
.slider .slide {
    border-top:8px solid #fff;
    width:100%;
    height:400px !important;
    background-size:cover !important
}

function.php

<?php

function load_stylesheets(){

    wp_register_style('reset', get_template_directory_uri() . '/assets/css/reset.min.css' , array(), 1, 'all');
    wp_enqueue_style('reset');

    wp_register_style('bootstrap', get_template_directory_uri() . '/assets/css/bootstrap.min.css' , array(), 1, 'all');
    wp_enqueue_style('bootstrap');

    wp_register_style('lightbox', get_template_directory_uri() . '/assets/css/lightbox.css' , array(), 1, 'all');
    wp_enqueue_style('lightbox');

    wp_register_style('pre-classes', get_template_directory_uri() . '/assets/css/pre-classes.css' , array(), 1, 'all');
    wp_enqueue_style('pre-classes');

    wp_register_style('style', get_template_directory_uri() . '/assets/css/style.css' , array(), 1, 'all');
    wp_enqueue_style('style');

    wp_register_style('custom', get_template_directory_uri() . '/custom.css' , array(), 1, 'all');
    wp_enqueue_style('custom');

}

add_action('wp_enqueue_scripts', 'load_stylesheets');




//Load Scripts

function addjs(){

wp_register_script('jquery' , get_template_directory_uri() . '/assets/js/jquery.min.js' , array() , 1, 1, 1);
wp_enqueue_script('jquery');

wp_register_script('bootstrap' , get_template_directory_uri() . '/assets/js/bootstrap.min.js' , array() , 1, 1, 1);
wp_enqueue_script('bootstrap');

wp_register_script('cycle' , get_template_directory_uri() . '/assets/js/cycle.min.js' , array() , 1, 1, 1);
wp_enqueue_script('cycle');

wp_register_script('imagelightbox' , get_template_directory_uri() . '/assets/js/imagelightbox.min.js' , array() , 1, 1, 1);
wp_enqueue_script('imagelightbox');

wp_register_script('plugins' , get_template_directory_uri() . '/assets/js/plugins.jquery.js' , array() , 1, 1, 1);
wp_enqueue_script('plugins');

wp_register_script('custom-jquery' , get_template_directory_uri() . '/assets/js/custom.jquery.js' , array() , 1, 1, 1);
wp_enqueue_script('custom-jquery');

wp_register_script('gmap3' , get_template_directory_uri() . '/assets/js/gmap3.min.js' , array() , 1, 1, 1);
wp_enqueue_script('gmap3');

wp_register_script('custom' , get_template_directory_uri() . '/custom.js' , array() , 1, 1, 1);
wp_enqueue_script('custom');

}

 add_action('wp_enqueue_scripts', 'addjs');

?>

Your kindly attentions and feedback are highly appreciated.

Thank You!


Viewing all articles
Browse latest Browse all 74297

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>