wp_register_style not working
-
Hi guys,
I’m trying to get my get_template_directory_uri() to work but for style, but my css is not working on front end. I did put this link in the header but I understand that is not the right way
<link href="<?php bloginfo('stylesheet_url'); ?>" rel = "stylesheet">
This is my code so far:
<?php function lapizzaria_styles() { // adding stylesheets wp_register_style('style', get_template_directory_uri() . 'style.css', array() ); // Enqueue the style wp_enqueue_style('style'); wp_register_style('normalize', get_template_directory_uri() . '/css/style.css', array(), '7.0.0'); wp_enqueue_style('normalize'); } add_action('wp-enqueue_scripts', 'lapizzaria_styles'); function lapizzaria_menus(){ register_nav_menus(array( 'header-menu' => __('Header Menu', 'lapizzaria'), 'social-menu' => __('Social Menu', 'lapizzaria') )); } add_action('init', 'lapizzaria_menus'); ?>
Any ideas welcome.
The page I need help with: [log in to see the link]
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘wp_register_style not working’ is closed to new replies.