我想有這些社交圖標浮動:權在我的頁腳。但是,當我嘗試關閉PHP標籤之前這>:我怎樣才能使這個PHP片段浮動:在我的頁腳,但仍然在頁面的正文?
<span style="float:right;"><?php if (function_exists('cn_social_icon')) echo
cn_social_icon(); ?></span>
它給我:
Parse error: syntax error, unexpected '<' in /home/jpweber/public_html/footer.php
on line 33
如果我把它下面關閉PHP標籤,>,它的工作原理,但出現外部頁面的正文,方式在屏幕的右下角(在藍色區域)。
我想它的頁面的正文中,但我希望得到它漂浮到右邊。我可以得到它的身體內出現的唯一方法就是用這種閉幕PHP標記上方:
if (function_exists('cn_social_icon')) echo cn_social_icon();
下面收盤>?。但它不會浮動:正確。
所以我必須從某個地方執行一些代碼在頁腳,這是目前這個,你在圖片中看到,其中如果(function_exists(「cn_social_icon」))回聲cn_social_icon();只是在那裏混合:
<?php
/**
* Builds the footer structure.
*
* @package Catalyst
*/
global $catalyst_layout_id;
if (function_exists('cn_social_icon')) echo cn_social_icon();
if(!is_page_template('template-blank-body.php'))
{
catalyst_hook_before_before_footer($catalyst_layout_id . '_catalyst_hook_before_before_footer');
catalyst_hook_before_footer($catalyst_layout_id . '_catalyst_hook_before_footer');
catalyst_hook_after_before_footer($catalyst_layout_id . '_catalyst_hook_after_before_footer');
catalyst_hook_footer($catalyst_layout_id . '_catalyst_hook_footer');
catalyst_hook_before_after_footer($catalyst_layout_id . '_catalyst_hook_before_after_footer');
catalyst_hook_after_footer($catalyst_layout_id . '_catalyst_hook_after_footer');
catalyst_hook_after_after_footer($catalyst_layout_id . '_catalyst_hook_after_after_footer');
}
wp_footer();
catalyst_hook_after_html($catalyst_layout_id . '_catalyst_hook_after_html');
/**
* Un-comment the below function to list all items currently hooked into a WordPress or Catalyst hook.
*/
//catalyst_list_hooked();
/**
* Un-comment the below function to display the number of database queries during the WordPress execution.
*/
//echo get_num_queries();
?>
</body>
</html>
任何幫助將不勝感激!
發佈整個footer.php的內容 – 2013-02-23 00:22:53
謝謝尼古拉斯;我編輯了這個問題以包含整個頁腳。感謝您花時間嘗試幫助! – 2013-02-23 00:29:14
使用這個footer.php,你仍然在第33行得到這個錯誤? – 2013-02-23 00:31:15