WordPress
2
Вклад в тег
@font-face {
font-family: 'Raleway';
src: url('hinted-subset-Raleway-SemiBoldItalic.eot');
src: local('Raleway SemiBold Italic'), local('Raleway-SemiBoldItalic'),
url('hinted-subset-Raleway-SemiBoldItalic.eot?#iefix') format('embedded-opentype'),
url('hinted-subset-Raleway-SemiBoldItalic.woff2') format('woff2'),
url('hinted-subset-Raleway-SemiBoldItalic.woff') format('woff'),
url('hinted-subset-Raleway-SemiBoldItalic.ttf') format('truetype'),
url('hinted-subset-Raleway-SemiBoldItalic.svg#Raleway-SemiBoldItalic') format('svg');
font-weight: 600;
font-style: italic;
}
get_option('mainpage'); // id поля опции уже сами выберите
<?php
class Toster_Theme_Customize{
public static function init()
{
$customize = new Toster_Theme_Customize();
add_action( 'customize_register', array($customize, 'customizeRegister') );
}
public function customizeRegister( $wp_customize )
{
$wp_customize->add_section(
'theme_option', // id секции
array(
'title' => __('Theme Options', "interia"),
'priority' => 1
)
);
if ( get_pages() ) {
$wp_customize->add_setting( 'mainpage', array(
'type' => 'option',
'capability' => 'manage_options',
) );
$wp_customize->add_control( 'mainpage', array(
'label' => __( 'Main page', "interia" ),
'section' => 'theme_option',
'type' => 'dropdown-pages',
) );
}
}
}
Toster_Theme_Customize::init();