$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>how to load basic wordpress css|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

how to load basic wordpress css

matteradmin9PV0评论

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 your header.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
Add a comment  | 

1 Answer 1

Reset to default 0

WordPress 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.

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far