Reputation: 2413
So I've never worked with wordpress before and my brother said it was way easier then just script it so I thought I'll give it a try. Now I've made a theme and it works, but whenever I try to use a plugin it doesn't have any css or javascript associated with it. I'm probably missing something basic but it's been bothering me the last 6 hours. These are my header and footer files:
Header
<!doctype html>
<html lang="en" class="no-js">
<head>
<title>Salon BellaVita</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="icon" type="image/ico" href="favicon.ico"/>
<!-- Latest compiled and minified CSS -->
<!-- <link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-theme.css">-->
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:600italic,400,600,700,800' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" />
<link rel="stylesheet" href="http://code.ionicframework.com/ionicons/1.5.2/css/ionicons.min.css">
<?PHP
function theme_name_scripts() {
wp_enqueue_style( 'style-name', get_stylesheet_uri() );
wp_enqueue_script( 'script-name', get_template_directory_uri() . '/js/example.js', array(), '1.0.0', true );
}
add_action( 'wp_enqueue_scripts', 'theme_name_scripts' );
?>
<!-- Latest compiled and minified JavaScript -->
</head>
<body>
<!-- Header ================================================== -->
<header class="clearfix header container">
<div class="top-line navbar navbar-fixed-top">
<div class="container">
<ul class="top-menu left">
<li><a href="?page_id=24"><i class="icon ion ion-email"></i> Mail ons</a></li>
<li><a href="#"><i class="icon ion ion-ios7-telephone"></i> Tel 0181-640588</a></li>
</ul>
<ul class="top-menu right">
<li>
<a href="https://www.facebook.com/pages/Bella-Vita/462965717112835">
<i class="icon ion ion-social-facebook"></i></a>
</li>
<li>
<a href="http://www.enjoygram.com/salonbellavita">
<i class="icon ion ion-social-instagram-outline"></i></a>
</li>
</ul>
</div>
</div>
</header>
<!-- End Header -->
Footer
<footer>
<div class="container">
<div class="row">
<div class="col-md-2 text-center">
<p class="footercenter">
Bella Vita
Contact informatie: <a href="mailto:[email protected]">
[email protected]</a>.
</p>
</div>
<div class="col-md-8 text-center">
<ul>
<?php wp_list_pages( $args ); ?>
</ul>
</div>
<div class="col-md-2 text-center">
<p class="footercenter">
<img src="images/logo.png" alt="Salon Bellavita" width="200" height="60" />
</p>
</div>
</div>
</div>
Does someone know what I'm missing?
Upvotes: 0
Views: 126
Reputation: 81
You need to include <?php wp_head(); ?>
before your </head>
tag, and <?php wp_footer(); ?>
before your </body>
tag. Plugins rely on these tags to add styles and scripts correctly.
Upvotes: 2