目录

修改WordPress区块引用格式

misaraty 更新 | 2022-01-28
前言
  • WordPress 4.8.13,主题为Twenty Seventeen。

  • 区块引用字体为正文字体大小,斜体改为正常,左侧加了3px的引用线。

修改网页正文

修改/domains/misaraty.com/public_html/wp-content/themes/twentyseventeen/functions.php,将

1
2
// Theme stylesheet.
wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri(), array(), '20190507' );

改为,

1
2
// Theme stylesheet.
wp_enqueue_style( 'twentyseventeen-style', get_stylesheet_uri(), array(), null ); //'20190507'
警告
此步骤必须先进行。否则,后续的css修改,网页刷新不起作用。

接着,修改/domains/misaraty.com/public_html/wp-content/themes/twentyseventeen/style.css,将

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
blockquote {
  color: #666;
  font-size: 18px;
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

改为,

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
blockquote {
  color: #666;
  border-left: 3px solid #c9c9c9;
  font-size: 18px;
  font-size: 1rem;
  font-style: normal;
  line-height: 1.7;
  margin: 0;
  /* overflow: hidden; */
  /* padding: 0; */
  padding-left: 0.5em;
}
}

修改后台编辑器

/domains/misaraty.com/public_html/wp-includes/version.php

1
$tinymce_version = '4603-20170530';

改为,

1
$tinymce_version = null; //'4603-20170530'

/domains/misaraty.com/public_html/wp-content/themes/twentyseventeen/assets/css/editor-style.css

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
blockquote {
  color: #666;
  font-size: 18px;
  font-size: 1.125rem;
  font-style: italic;
  line-height: 1.7;
  margin: 0;
  overflow: hidden;
  padding: 0;
}

改为,

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
blockquote {
    color: #666;
    border-left: 3px solid #c9c9c9;
    font-size: 18px;
    font-size: 1rem;
    font-style: normal;
    line-height: 1.7;
    margin: 0;
    /* overflow: hidden; */
    /* padding: 0; */
    padding-left: 0.5em;
}