Baixei um tema de filho do Nick’s OceanWP. Exportei todas as minhas configurações como recomendado que eu tenha o tema infantil instalado e ativado. Então importei minhas configurações através de um painel temático. Tudo funcionou perfeitamente até aquele ponto.
Gostaria de editar a folha de estilo adicionando fontes de marcador permanentes e Google Raleway e hospedando-as no meu servidor.
Adicionei o seguinte CSS (e outras versões de Raleway) com os subtópicos de estilo.css
/* raleway-100 - latin */
@font-face {
font-family: 'Raleway';
font-style: normal;
font-weight: 100;
src: url('https://paleo-lounge.de/fonts/raleway-v12-latin-100.eot'); /* IE9 Compat Modes */
src: local('Raleway Thin'), local('Raleway-Thin'),
url('https://paleo-lounge.de/fonts/raleway-v12-latin-100.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('https://paleo-lounge.de/fonts/raleway-v12-latin-100.woff2') format('woff2'), /* Super Modern Browsers */
url('https://paleo-lounge.de/fonts/raleway-v12-latin-100.woff') format('woff'), /* Modern Browsers */
url('https://paleo-lounge.de/fonts/raleway-v12-latin-100.ttf') format('truetype'), /* Safari, Android, iOS */
url('https://paleo-lounge.de/fonts/raleway-v12-latin-100.svg#Raleway') format('svg'); /* Legacy iOS */
}
Eu carreguei as fontes correspondentes à localização das pastas acima)
O tema infantil funciona.php é o seguinte:
<?php
/**
* Child theme functions
*
* When using a child theme (see http://codex.wordpress.org/Theme_Development
* and http://codex.wordpress.org/Child_Themes), you can override certain
* functions (those wrapped in a function_exists() call) by defining them first
* in your child theme's functions.php file. The child theme's functions.php
* file is included before the parent theme's file, so the child theme
* functions would be used.
*
* Text Domain: oceanwp
* @link http://codex.wordpress.org/Plugin_API
*
*/
/**
* Load the parent style.css file
*
* @link http://codex.wordpress.org/Child_Themes
*/
function oceanwp_child_enqueue_parent_style() {
// Dynamically get version number of the parent stylesheet (lets browsers re-cache your stylesheet when you update your theme)
$theme = wp_get_theme( 'OceanWP' );
$version = $theme->get( 'Version' );
// Load the stylesheet
wp_enqueue_style( 'child-style', get_stylesheet_directory_uri() . '/style.css', array( 'oceanwp-style' ), $version );
}
add_action( 'wp_enqueue_scripts', 'oceanwp_child_enqueue_parent_style' );
Agora meu problema é:
Qualquer coisa que aconteça. Meu tema volta para fontes padrão e não usa as auto-hospedadas.
O que estou fazendo de errado? Deixei funções.php como o OceanWP gerou.
Obrigado por me ajudar.
Sobre Sascha
Este tema foi modificado há 2 anos, há 9 meses por. Este tema foi modificado há 2 anos, há 9 meses por. Autor do tema
Olá, você seguiu este vídeo? https://youtu.be/ebSmX8HzCMc
Isto foi útil?
0 / 0