Skip to content

Instantly share code, notes, and snippets.

@deckerweb
Created November 18, 2012 17:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save deckerweb/4106349 to your computer and use it in GitHub Desktop.
Save deckerweb/4106349 to your computer and use it in GitHub Desktop.
Genesis Widgetized Archive -- hooks, filters and constants for customizing
<?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
*/
@deckerweb
Copy link
Author

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment