如何在wp_get_archives生成的输出中插入CSS样式


How to insert CSS styles into the output generated by wp_get_archives

我是新手,想知道应该在上面的行中插入css样式。。有人能给我看看吗?

<?php wp_get_archives( array( 'type' => 'postbypost', 'limit' => 10, 'format' => 'html' ) ); ?>

如果您决定使用样式属性,我会使用beforeafter选项,如下所示:

wp_get_archives(
    array(
        'type' => 'postbypost',
        'limit' => 10,
        'format' => 'html',
        'before' => '<span style="color: red;">',
        'after' => '</span>',
    )
);

在此处,您可以使用所需的任何样式替换color: red;