douyi8315 2014-08-11 20:38
浏览 117

style.css不影响新的页面模板

I have added a new template to my theme folder called login.php.

Here is the code for login.php:

<?php
/**
 * Template Name: login
 * Description: login page
 * @package Backyard Cures
 */
?>

<?php get_header(); ?>

@import url("./wp-content/themes/backyard-cures/style.css")

<div class="all-content">
<div class="all-content-container">    
    <?php wp_login_form(); ?>
    <?php get_sidebar(); ?>
    <?php wp_footer(); ?>

I am having two problems, perhaps they are related.

1) When I open the login page, the chrome developer does not register the all-content and all-content-container divs.

2)When I try to style the elements in login.php using style.css those changes don't show. In fact, the chrome developer does not seem to be registering any css at all.

Thanks in advance

  • 写回答

4条回答 默认 最新

  • doufengsui7449 2014-08-11 20:44
    关注

    @import will only work when used within a css file. To include the css on your page you need to do something like:

    <link rel="stylesheet" type="text/css" href="./wp-content/themes/backyard-cures/style.css"/>
    
    评论

报告相同问题?

悬赏问题

  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题
  • ¥15 lna设计 源简并电感型共源放大器
  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)