( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKBase.class.php on line 114
Call Stack
#TimeMemoryFunctionLocation
10.0021416632{main}( ).../index.php:0
20.08894722544Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.475614259440Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.475714259384Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.475714259760Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.475714259760Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.475814259856Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.476114299776require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.480214597464GKTemplate->__construct( ).../component.php:31
100.484914766840GKTemplateMenu->getMenuType( ).../gk.framework.php:84
110.485414811696require_once( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKMenu.php' ).../helper.menu.php:19

( ! ) Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/lib/menu/GKHandheld.php on line 76
Call Stack
#TimeMemoryFunctionLocation
10.0021416632{main}( ).../index.php:0
20.08894722544Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.475614259440Joomla\CMS\Application\SiteApplication->render( ).../CMSApplication.php:202
40.475714259384Joomla\CMS\Application\SiteApplication->render( ).../SiteApplication.php:778
50.475714259760Joomla\CMS\Document\HtmlDocument->parse( ).../CMSApplication.php:1030
60.475714259760Joomla\CMS\Document\HtmlDocument->_fetchTemplate( ).../HtmlDocument.php:545
70.475814259856Joomla\CMS\Document\HtmlDocument->_loadTemplate( ).../HtmlDocument.php:730
80.476114299776require( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/component.php' ).../HtmlDocument.php:668
90.480214597464GKTemplate->__construct( ).../component.php:31
100.487014939640GKTemplateMenu->getMenuType( ).../gk.framework.php:85
在任意位置插入小工具 wordpress主题修改 让主题支持小工具
Logo
Print this page

在任意位置插入小工具 wordpress主题修改 让主题支持小工具

输入以下代码到 /wp-content/theme/themename/functions.php 如果没有可以自己手动创建一个。

 

<?php 
if (function_exists('register_sidebar')) { 
register_sidebar(array( 
'name' => '边栏1', // 侧边栏 1 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
));
 
register_sidebar(array( 
'name' => '边栏2', // 侧边栏 2 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
));
 
register_sidebar(array( 
'name' => '边栏3', // 侧边栏 3 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
));
 
register_sidebar(array( 
'name' => '边栏4', // 侧边栏 4 的名称 
'before_widget' => '<li>', // widget 的开始标签 
'after_widget' => '</li>', // widget 的结束标签 
'before_title' => '<h3>', // 标题的开始标签 
'after_title' => '</h3>'// 标题的结束标签
 
)); 
} 
?>

 

1之后我们只需要在想要添加小工具的地方数据以下代码。2

<?php 
if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('边栏名称3')): 
?> 
<?php 
endif; 

?>3

 

 

Last modified onSunday, 23 December 2012 14:45

( ! ) Warning: count(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 169
Call Stack
#TimeMemoryFunctionLocation
10.0010416392{main}( ).../index.php:0
20.11384722304Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.11394722304Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.359712450888Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.360912475952Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.361812531280Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.362112560104require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.373612995512K2ControllerItem->execute( ).../k2.php:64
90.373612995512K2ControllerItem->display( ).../BaseController.php:710
100.384513720712K2ControllerItem->display( ).../item.php:78
110.384513720712K2ControllerItem->display( ).../controller.php:19
120.390414117080Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.392414137448K2ViewItem->display( ).../ViewController.php:102
140.486317041504K2ViewItem->display( ).../view.html.php:742
150.486317041504K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.489017221704include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701

( ! ) Notice: Only variables should be assigned by reference in /var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php on line 478
Call Stack
#TimeMemoryFunctionLocation
10.0010416392{main}( ).../index.php:0
20.11384722304Joomla\CMS\Application\SiteApplication->execute( ).../index.php:49
30.11394722304Joomla\CMS\Application\SiteApplication->doExecute( ).../CMSApplication.php:196
40.359712450888Joomla\CMS\Application\SiteApplication->dispatch( ).../SiteApplication.php:233
50.360912475952Joomla\CMS\Component\ComponentHelper::renderComponent( ).../SiteApplication.php:194
60.361812531280Joomla\CMS\Component\ComponentHelper::executeComponent( ).../ComponentHelper.php:377
70.362112560104require_once( '/var/www/vhosts/shan.info/httpdocs/components/com_k2/k2.php' ).../ComponentHelper.php:402
80.373612995512K2ControllerItem->execute( ).../k2.php:64
90.373612995512K2ControllerItem->display( ).../BaseController.php:710
100.384513720712K2ControllerItem->display( ).../item.php:78
110.384513720712K2ControllerItem->display( ).../controller.php:19
120.390414117080Joomla\CMS\Cache\Controller\ViewController->get( ).../BaseController.php:663
130.392414137448K2ViewItem->display( ).../ViewController.php:102
140.486317041504K2ViewItem->display( ).../view.html.php:742
150.486317041504K2ViewItem->loadTemplate( ).../HtmlView.php:230
160.489017221704include( '/var/www/vhosts/shan.info/httpdocs/templates/gk_publisher/html/com_k2/templates/default/item.php' ).../HtmlView.php:701
Template Design © Joomla Templates | GavickPro. All rights reserved.