首页 文章

WP:如果声明[关闭]

提问于
浏览
1

我在WordPress中创建了一个2语言站点,我需要说:

如果html方向是RTL使用一些代码,否则使用另一个代码...

我用我在Joomla中使用的传统方式尝试过这个

<?php    if( $this->direction=="rtl"){ ?>

/images/slider/01.jpg " alt="滑块01 " title=" #htmlcaption " /> /images/slider/02.jpg" alt = "Slider 02" title = "#htmlcaption" /> /images/slider/03.jpg " alt=" Slider 03 " title=" #htmlcaption " /> /images/slider/04.jpg" alt = "Slider 04" title = "#htmlcaption" /> هذا مثاللما يمكنانيكتبهنا . /images/slider/01.jpg " alt=" Slider 01 " title=" #htmlcaption " /> /images/slider/02.jpg" alt = "Slider 02" title = "#htmlcaption" /> /images/slider/03.jpg " alt=" Slider 03 " title=" #htmlcaption " /> /images/slider/04.jpg" alt = "Slider 04" title = "#htmlcaption" />提供成本效益AND RELIABLE MARINE TRANSPORTATION This 是带有链接的HTML Headers 的示例 . This 是带有链接的HTML Headers 的示例 . This 是带有链接的HTML Headers 的示例 .
但它总是说有一个致命的错误..我想我需要将 $this 定义为html页面,但如何在PHP中说这个?

:在第7行的C:\ AppServ \ www \ wordpress \ wp-content \ themes \ wp \ index.php中不在对象上下文中时使用$ this

2 回答

相关问题