I'm looking to convert an HTML site into a WordPress site while keeping the same theme intact.
Even after adding 'wp_enqueue_style' to the functions.php
file, the CSS file is not being recognized by WordPress.
- functions.php
<?php
function our_theme_dependencies(){ ?>
<script>alert("its working"); </script>
<?php
//css libraries
wp_enqueue_style('main-style', get_stylesheet_directory_uri().'/assets/css/style.css');
wp_enqueue_style('bootstrap-style', get_stylesheet_directory_uri().'/assets/css/jquery.bxslider.css');
wp_enqueue_style('plugin-set', get_stylesheet_directory_uri().'/assets/css/plugin.css');
}
add_action('wp_enqueue_scripts', 'our_theme_dependencies');
?>
- front-page.php
<?php get_header(); ?>
<div class="notice-board-row">
<div class="container notice-board-container">
<div class="notice-board-wraper">
<h3>Notice Board</h3>
<div class="notice-board-slider">
<div class="notice-item">
<div class="date">
<span class="month">Jan</span>
<span class="no">22</span>
<span class="year">2020</span>
</div>
<?php get_footer(); ?>
I anticipate that the WordPress version of the site will retain the same theme as the original HTML site.