1
매주 금요일 오후 9시에 ON AIR CONTENT를 표시 한 다음 12am에 중지하고 OFF AIR CONTENT로 되돌아 가야합니다.PHP는 요일과 시간대를 기준으로 콘텐츠를 표시합니다.
다음은 이것을 가능하게하기 위해 수동으로 변경 한 2 세트의 코드입니다. 올바른 코드를 얻으면 자동화 할 수 있습니다.
아무도 도와 줄 수 있습니까?
/* ON AIR CONTENT*/
function banner_rotator() {
if (is_home()) { ?>
<div id="rotator"><iframe width="630" height="386" src="http://www.ustream.tv/embed/8805257?v=3&wmode=direct?autoplay=true" scrolling="no" frameborder="0" style="border: 0px none transparent;"> </iframe> <?php if(function_exists('vslider')){ vslider('frontpage'); } ?></div>
<div class="main">
<!-- FIFTH EXAMPLE -->
<div class="view view-fifth">
<img src="../1.jpg" />
<div class="mask">
<h2>FULLY LOADED 2012</h2>
<p>This event has been cancelled.</p>
<a href="#" class="info">Details</a>
</div>
</div>
<div class="view view-fifth">
<img src="../2.jpg" />
<div class="mask">
<h2>KAFINAL - FALLING IN LOVE</h2>
<p>"The feedback to Falling in Love has been tremendous all over. I am getting calls from people in Jamaica, the Caribbean and even in the States...</p>
<a href="#" class="info">Read More</a>
</div>
</div>
</div>
<?php }
}
add_action('thesis_hook_before_content', 'banner_rotator');
_____________________________________________________________________________________
/* OFF AIR CONTENT */
function banner_rotator() {
if (is_home()) { ?>
<div id="rotator"> <?php if(function_exists('vslider')){ vslider('frontpage'); } ?></div>
<div class="main">
<!-- FIFTH EXAMPLE -->
<div class="view view-fifth">
<img src="../1.jpg" alt="FULLY LOADED 2012" title="FULLY LOADED 2012" />
<div class="mask">
<h2>FULLY LOADED 2012</h2>
<p>This event has been cancelled.</p>
<a href="#" class="info">Details</a>
</div>
</div>
<div class="view view-fifth">
<img src="../2.jpg" alt="KAFINAL - FALLING IN LOVE" title="FULLY LOADED 2012" />
<div class="mask">
<h2>KAFINAL - FALLING IN LOVE</h2>
<p>"The feedback to Falling in Love has been tremendous all over. I am getting calls from people in Jamaica, the Caribbean and even in the States...</p>
<a href="#" class="info">Read More</a>
</div>
</div>
</div>
<?php }
}
add_action('thesis_hook_before_content', 'banner_rotator');
작동하지 않는 이유는 무엇입니까? ... – dbf
지금 나는 위의 대기 코드와 위의 대기 코드를 수동으로 전환합니다. 이 프로세스를 자동화하는 PHP 날짜 함수를 올바르게 작성해야합니다. –