关键词:
<?php
add_action( 'genesis_meta', 'agency_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
* Link http://wpsites.net/web-design/add-widget-home-php-genesis/
*/
function agency_home_genesis_meta()
if ( is_active_sidebar( 'home-welcome' ) || is_active_sidebar( 'home-slider' ) || is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) )
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_after_header', 'agency_home_welcome_helper' );
add_action( 'genesis_loop', 'agency_home_loop_helper' );
add_action( 'genesis_loop', 'agency_home_full_helper' );
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
add_filter( 'body_class', 'add_body_class' );
function add_body_class( $classes )
$classes[] = 'agency';
return $classes;
function agency_home_welcome_helper()
if ( is_active_sidebar( 'home-welcome' ) )
echo '<div id="home-welcome">';
dynamic_sidebar( 'home-welcome' );
echo '</div><!-- end #home-welcome -->';
if ( is_active_sidebar( 'home-slider' ) )
echo '<div id="home-slider">';
dynamic_sidebar( 'home-slider' );
echo '</div><!-- end #home-slider -->';
function agency_home_loop_helper()
if ( is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) )
echo '<div id="home">';
echo '<div class="home-left">';
dynamic_sidebar( 'home-left' );
echo '</div><!-- end .home-left -->';
echo '<div class="home-middle">';
dynamic_sidebar( 'home-middle' );
echo '</div><!-- end .home-middle -->';
echo '<div class="home-right">';
dynamic_sidebar( 'home-right' );
echo '</div><!-- end .home-right -->';
echo '</div><!-- end #home -->';
function agency_home_full_helper()
if ( is_active_sidebar( 'full-content' ) )
echo '<div id="full-content">';
dynamic_sidebar( 'full-content' );
echo '</div><!-- end #full-content -->';
genesis();
php如何在创世纪2.0框架中添加后窗口小部件区域-wordpress提示(代码片段)
查看详情
在主题中扩展magento小部件布局(代码片段)
...置CatalogProductsList小部件将特色产品小部件添加到站点的主页。我希望做的是扩展在vendor/magento/module-catolog/widget/etc/widget.xml中找到的小部件布局文件,以便在使用WYSIWIG编辑器在cms块中添加此小部件时,我可以添加另一个模板选项... 查看详情
htmlmetropro主题小部件区域(代码片段)
查看详情
htmlmetropro主题小部件区域(代码片段)
查看详情
text添加小部件(代码片段)
查看详情
text顶点小部件(代码片段)
查看详情
text使用小部件magento(代码片段)
查看详情
text仪表板小部件(代码片段)
查看详情
text从类别wp小部件隐藏类别(代码片段)
查看详情
css使用与您的主页相似的小部件创建自定义页面模板(代码片段)
查看详情
php在主题激活期间,wordpress将小部件添加到侧边栏。(代码片段)
查看详情
php创世纪主题支持(代码片段)
查看详情
css创世纪样本主题(代码片段)
查看详情
text使用媒体小部件(drupal)上传图像时需要使用alt文本(代码片段)
查看详情
text将新的窗口小部件功能添加到home.php文件创建(代码片段)
查看详情
动态图像上传到备用gridster小部件上(代码片段)
我写了一个javascript代码,其中当用户添加新小部件时,他被要求上传小部件上显示的图像。但是当我上传图像时,它出现在备用小部件上。(当我添加第一个小部件和上传图像时,上传的图像出现在第二个小部件上(当我添加... 查看详情
如何从tkinter,python中的text小部件中移除焦点(代码片段)
通过在我的GUI中放置一个Text小部件fromTkinterimportTexttextBox=Text(root,height=20,width=10)textBox.pack()每当我在那个盒子里写东西时,我都无法将焦点还给窗口中的任何其他位置。我有一些键绑定到事件,在我写入文本小部件后停止工作。... 查看详情
text创世纪(代码片段)
查看详情