public
Last active

Genesis Widgetized Archive -- hooks, filters and constants for customizing

  • Download Gist
gistfile1.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
<?php
 
// Constants:
 
/** Genesis Widgetized Archive: Remove Second Widget Area */
define( 'GWAT_NO_SECOND_WIDGET_AREA', true );
 
/** Genesis Widgetized Archive: Remove Third Widget Area */
define( 'GWAT_NO_THIRD_WIDGET_AREA', true );
 
/** Genesis Widgetized Archive: Remove Widgets Shortcode Support */
define( 'GWAT_NO_WIDGETS_SHORTCODE', true );
 
 
// Hooks:
 
add_action( 'gwat_before_widgetized_area', 'custom_content_before_widgetized_area' );
/** Genesis Widgetized Archive: Add custom stuff before widgetized area */
function custom_content_before_widgetized_area() {
// Your specific before code here...
}
 
add_action( 'gwat_after_widgetized_area', 'custom_content_after_widgetized_area' );
/** Genesis Widgetized Archive: Add custom stuff after widgetized area */
function custom_content_after_widgetized_area() {
// Your specific after code here...
}
 
 
// Filters:
 
add_filter( 'gwat_filter_archive_one_widget_title', 'custom_archive_one_widget_title' );
/**
* Genesis Widgetized Archive: Custom Archive Page Template Widget Title
*/
function custom_archive_one_widget_title() {
return __( 'Custom Archive Page', 'your-child-theme-textdomain' );
}
 
/**
* Same principles apply to the other widget area titles/ descriptions:
* gwat_filter_archive_one_widget_title
* gwat_filter_archive_one_widget_description
* gwat_filter_archive_two_widget_title
* gwat_filter_archive_two_widget_description
* gwat_filter_archive_three_widget_title
* gwat_filter_archive_three_widget_description
*/

Note: The above codes work with plugin version 1.0.0 or higher!

Extended explanation can be found at the plugin's page "FAQ" section:
http://wordpress.org/extend/plugins/genesis-widgetized-archive/faq/

Download "Genesis Widgetized Archive" plugin at WordPress.org:
http://wordpress.org/extend/plugins/genesis-widgetized-archive/

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.