text WordPress主题从头开始构建与Undersecores

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text WordPress主题从头开始构建与Undersecores相关的知识,希望对你有一定的参考价值。

Rum MAMP
Download Wordpress and place in a new htdocs folder
Create db and run wp install by just navigating to the newly created folder
Dowload underscores from underscores.me. Use advanced options and choose sissify.
Copy the downloaded underscores folder to the themes directory and activate.
Download the xml theme unit test file from wordpress.org.
Go to tool > import and import the file, choose to download images.
Install the Developer plugin from Automatic
  Choose: debug bar, monster widget, regenerate thumbnails, and theme check
  To install more later just go to tools > Developer
  Turn on WP_DEBUG by editing wp-cofig.php: define('WP_DEBUG', true);
Install Show Current Template plugin

FONTS
Add fonts: Select from Google Fonts then copy url
Add to functions.php:
  // Enqueue Google Fonts: Source Sans Pro and PT Serif
  wp_enqueue_style( 'markscores-fonts', "https://fonts.googleapis.com/css?family=PT+Serif:400,400i,700,700i|Source+Sans+Pro:400,400i,900" );
  
Add to sass/variables-site/typography.scss:
  // Added from google fonts plus added fallbacks
  $font__serif: 'PT Serif', Georgia, Cambria, "Times New Roman", Times, serif;
  $font__sans: 'Source Sans Pro', "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Arial, sans-serif;

Add to sass/typography/_typograhy.scss:
  font-family: $font__serif;
Add to sass/typography/_headings.scss:
  font-family: $font__sans;
  
  
  

以上是关于text WordPress主题从头开始构建与Undersecores的主要内容,如果未能解决你的问题,请参考以下文章