모든 페이지마다 다른 텍스트, 배경 및 기타 요소의 색이있는 테마를 디자인하고 있습니다. 내가있을 때서브 페이지가 Wordpress에서 상위 스타일을 상속하는 방법은 무엇입니까?
<?php if (is_home() || is_search() || is_archive())
{
?>
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/css/home.css" type="text/css" media="screen" />
<?php } elseif(is_category('Turismo a Bra') || is_page('Turismo a Bra'))
{
?>
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/css/turismo-a-bra.css" type="text/css" media="screen" />
<?php } elseif (is_category ('Eventi') || is_page('Eventi'))
{
?>
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/css/eventi.css" type="text/css" media="screen" />
<?php } elseif (is_category ('Arte e Cultura') || is_page('Arte e Cultura'))
{
?>
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/css/arte-e-cultura.css" type="text/css" media="screen" />
<?php } elseif (is_category ('Enogastronomia')|| is_page('Enogastronomia'))
{
?>
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/css/enogastronomia.css" type="text/css" media="screen" />
<?php } elseif (is_category ('Natura')|| is_page('Natura'))
{
?>
<link rel="stylesheet" href="<?php bloginfo('template_url')?>/css/natura.css" type="text/css" media="screen" />
<?php } else { ?>
<?php } ?>
문제가 온다 (그리고 내가 많이 가지고) 하위 페이지의를 : 나는이 함께 매 페이지 (및 관련 포스트 카테고리) 스타일을 할 수 있었다. 나는 그들로 하여금 부모로서의 스타일을 가지기를 바랍니다. 그 WP는 is_sub_page (#)를 가지고 있지만 운이 없다.
서브 페이지를 처리 할 때 헤더를 이해하도록 조건에 무엇을 추가해야하는지 알고 있습니까?이 경우 부모의 ID를 가져 와서 해당 스타일의 페이지를 기반으로합니다.
나는 php와 wordpress로 초보자이며, 내 머리 속에는 의미가 있지만, 문구를 어떻게 쓰는지는 모른다. , 예
고마워요이다 here (서브 페이지의 우측 상단에 있습니다.
DUDE! 그것은 작동합니다! 정말 고마워! –