i am making a wordpress theme and i don't know why theme don't load a basic wordpress css. My site file css "style.css" is load but if i add wordpress php to theme in "inspect" on chrome i see that class from basic wordpress css was add but he doesn't has a style. for example my menu with wordpress php has a text decoration from basic tag . I hope you know what i mean.
My header :
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything
up until <div id="content">
*
* @link
*
* @package WordPress
* @subpackage StarterBootstrap
* @since 1.0
* @version 1.0
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="<?php bloginfo('description'); ?>">
<meta name="author" content="Autor">
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
<!-- Custom fonts for this template -->
<link href=':400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template -->
<link href="<?php bloginfo( 'stylesheet_url' ); ?>" rel="stylesheet">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
i am making a wordpress theme and i don't know why theme don't load a basic wordpress css. My site file css "style.css" is load but if i add wordpress php to theme in "inspect" on chrome i see that class from basic wordpress css was add but he doesn't has a style. for example my menu with wordpress php has a text decoration from basic tag . I hope you know what i mean.
My header :
<?php
/**
* The header for our theme
*
* This is the template that displays all of the <head> section and everything
up until <div id="content">
*
* @link
*
* @package WordPress
* @subpackage StarterBootstrap
* @since 1.0
* @version 1.0
*/
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="<?php bloginfo('description'); ?>">
<meta name="author" content="Autor">
<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
<!-- Custom fonts for this template -->
<link href='https://fonts.googleapis/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<!-- Custom styles for this template -->
<link href="<?php bloginfo( 'stylesheet_url' ); ?>" rel="stylesheet">
<?php wp_head(); ?>
</head>
<body <?php body_class(); ?>>
Share
Improve this question
asked Oct 25, 2018 at 14:25
CisekCisek
11 bronze badge
2
|
1 Answer
Reset to default 0WordPress doesn't load any of styles on the front-end. Some WordPress functions output HTML markup with classes and IDs, but it's the job of the theme to style to this markup.
Some default styless that you'll see, such as text-decoration
on links, are just the browser's default styles.
wp_enqueue_style()
instead of adding them statically to yourheader.php
– Howdy_McGee ♦ Commented Oct 25, 2018 at 14:37