我是全新的主题开发人员。我的css样式表没有加载,我不确定问题是否出在函数中。php,样式。css,索引。php,标题。php或页脚。php文件。我在索引中添加了一个div类“post title”。php,它应该改变我帖子的字体颜色,但现在它没有这样做。我的代码如下:
functions.php:
            <?php
                function link_css_stylesheet() {
                    wp_enqueue_style(\'style\', get_stylesheet_uri());
                }
                add_action(\'wp_enqueue_scripts\', \'link_css_stylesheet\');
            ?>
style.css:
            /*
            Theme Name: Richard Theme Name
            Theme URI: http://www.intechio.com/themes/Richard-Theme
            Author: Richard
            Author URI: https://intechio.com
            Description: Theme project.  
            Version: 1.0
            */
            .post-title {
                color : rgb(0,100,0);
            }
index.php:
            <?php
                get_header();
                ?>
                <div class="post-title">
                    <?php
                    if (have_posts()) : 
                        while (have_posts()) : the_post();
                            the_title();
                            the_excerpt();
                        endwhile; 
                    else: 
                        echo "No posts.";
                    endif;
                    ?>
                </div>
                <?php
                get_footer();
            ?>
header.php:
            <!DOCTYPE html>
                <html>
                    <head>
                        <meta charset=”<?php bloginfo(‘charset’); ?>
                        <title><?php wp_title(); ?> | <?php bloginfo(\'name\'); ?></title>
                        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
                        <?php wp_head(); ?>
                    </head>
                        <body <?php body_class(); ?>>
                            <h1><?php bloginfo(‘name’); ?></h1>
                            <h2><?php bloginfo(‘description’); ?></h2>
footer.php:
            <p>this is a footer</p>
            </body>
            </html>
 提前感谢您提供的任何提示。