admin管理员组文章数量:1130349
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.
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
-
Have you added the main comment to the top of the stylesheet? Have you made sure that the theme is active under Appearance -> Themes? Also, I suggest checking out
wp_enqueue_style()instead of adding them statically to yourheader.php– Howdy_McGee ♦ Commented Oct 25, 2018 at 14:37 - 1 There are no styles, just classes, the styles are up to you. – Milo Commented Oct 25, 2018 at 15:18
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.
本文标签: how to load basic wordpress css
版权声明:本文标题:how to load basic wordpress css 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://it.en369.cn/questions/1749231872a2336623.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


wp_enqueue_style()instead of adding them statically to yourheader.php– Howdy_McGee ♦ Commented Oct 25, 2018 at 14:37