Plugin / Genesis Widgetized Archive

David Decker - DECKERWEB

Frequently Asked Questions (FAQ)

One should be enough for a lot of use cases. However, having 3 widget areas enables you to use up to 3 columns (see below), which makes sense to make it all more viewable. For example: you’ve given your archive page the ‘Full Width Content” layout option and use widgets in all 3 areas. Result: perfectly layered 3-column layout consisting of widgets. How cool’s that? 🙂
Column layouts are enabled automatically the same time you place any widget in the second or third widget area (implied the 1st is also active). The needed very few CSS styles are provided by the plugin (unfortunately not all child themes have these column classes included by default) and ONLY enqueued for that archive page (so very lightweight still!). 1st area OR 2nd area OR 3rd area active: one column layout 1st + 2nd OR 1st + 3rd OR 2nd + 3rd areas active: 2-column layout all 3 areas active: 3-column layout
Yes, of course they are! If your child theme is already responsive and you use columnized areas they just adapt to your viewport nicely. Additionally, the break point for the 2-column and 3-column layout is set to 640px: so on smaller devices/viewports the columns automatically switch to an 100% width. — You can change all CSS media queries with !important or own styles (see below!). Note, if your child theme isn’t responsive yet these CSS media queries won’t have any effect and also do no harm :-).
That’s possible of course! Just add one or both of the following constants to your child theme’s functions.php file – or to a functionality plugin instead (recommended!): /** 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 );
It’s all done via your child theme. Maybe you need to add an !important to some CSS rules here and there… For more even better styling I included some IDs and classes: Each widget in all areas gets an additional class: .gwat-archive — which allows to set some common styles for all widgets on the appropriate page! “Archive Page Template #1” section: whole content area, before & after all widgets is wrapped in a div with the ID: #gwat-archive-area-one plus class .gwat-archive-area each widget in this area has its own ID depending on the widget (regular WordPress behavior!) each widget gets an additional class: .gwat-archive-one — which allows to set some common styles for all widgets in this 1st area “Archive Page Template #2” section (optional): whole content area, before & after all widgets is wrapped in a div with the ID: #gwat-archive-area-two plus class .gwat-archive-area each widget in this area has its own ID depending on the widget (regular WordPress behavior!) each widget gets an additional class: .gwat-archive-two — which allows to set some common styles for all widgets in this 2nd area “Archive Page Template #3” section (optional): whole content area, before & after all widgets is wrapped in a div with the ID: #gwat-archive-area-three plus class .gwat-archive-area each widget in this area has its own ID depending on the widget (regular WordPress behavior!) each widget gets an additional class: .gwat-archive-three — which allows to set some common styles for all widgets in this 3rd area If that’s still not enough, you can even enqueue your own style, an action hook is included for that: gwat_load_styles — This hook fires within the WordPress action hook wp_enqueue_scripts just after properly enqueueing the plugin’s styles and only if at least one of both widgets is active, so it’s fully conditional!
You guess it, it’s just possible :). I have included 2 action hooks to achieve that. For example this could be useful for some admins who use more than one archive page or in general for Multisite installs. gwat_before_widgetized_area Example code to add stuff before the plugin’s widgetized section: 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... } gwat_after_widgetized_area Example code to add stuff after the plugin’s widgetized section: 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... } If needed, add such code snippets to your child theme’s functions.php file or via the preferred way, a functionality plugin or a code snippets plugin. Note: Only if these hooks are in use a div container with the class gwat-before-widgetized (for ‘before’) respectively gwat-before-widgetized (for ‘after’) is wrapped around the hook’s content then.
Of course, it’s possible! Just add the following constant to your child theme’s functions.php file or to a functionality plugin: /** Genesis Widgetized Archive: Remove Widgets Shortcode Support */ define( 'GWAT_NO_WIDGETS_SHORTCODE', true ); Some webmasters could need this for security reasons regarding their stuff members or for whatever other reasons… :).
I’ve just included some filters for that – if ever needed (i.e. for clients, branding purposes etc.), you can use these filters: gwat_filter_archive_one_widget_title – default value: “Archive Page Template #1” gwat_filter_archive_one_widget_description – default value: “This is the first widget area for the Archive Page Template (bundled with the Genesis Framework).” The same principles apply for ‘#2’ and ‘#3’. Here’s an example code for changing one of these 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' ); } Final note: I DON’T recommend to add customization code snippets to your child theme’s functions.php file! Please use a functionality plugin or an MU-plugin instead! This way you are then more independent from child theme changes etc. If you don’t know how to create such a plugin yourself just use one of my recommended ‘Code Snippets’ plugins. Read & bookmark these Sites: “What is a functionality plugin and how to create one?” – blog post by WPCandy “Creating a custom functions plugin for end users” – blog post by Justin Tadlock DON’T hack your functions.php file: Resource One – Resource Two (both by Thomas Griffin Media) “Code Snippets” plugin by Shea Bunge – also network wide! “Code With WP Code Snippets” plugin by Thomas Griffin – Note: Plugin currently in development at GitHub. “Toolbox Modules” plugin by Sergej Müller – see also his plugin instructions. All the custom & branding stuff code above can also be found as a Gist on GitHub: https://gist.github.com/4106349 (you can also add your questions/ feedback there 🙂
(1) In general: You may use it for “global” widgets. (2) Usage with the “WPML” plugin: Widgets can be translated with their “String Translation” component – this is much easier than adding complex information/instructions to the 404 error or search not found pages for a lot of languages… You can use the awesome “Widget Logic” plugin (or similar ones) and add additional paramaters, mostly conditional stuff like is_home() in conjunction with is_language( 'de' ) etc. This way widget usage on a per-language basis is possible. Or you place in the WPML language codes like ICL_LANGUAGE_CODE == 'de' for German language. Fore more info on that see their blog post: http://wpml.org/2011/03/howto-display-different-widgets-per-language/ With the following language detection code you are now able to make conditional statements, in the same way other WordPress conditional functions work, like is_single(), is_home() etc.: /** * WPML: Conditional Switching Languages * * @author David Decker - DECKERWEB * @link http://twitter.com/deckerweb * * @global mixed $sitepress */ function is_language( $current_lang ) { global $sitepress; if ( $current_lang == $sitepress->get_current_language() ) { return true; } } Note: Be careful with the function name ‘is_language’ – this only works if there’s no other function in your install with that name! If it’s already taken (very rare case though), then just add a prefix like my_custom_is_language(). –> You now can use conditionals like that: if ( is_language( 'de' ) ) { // do something for German language... } elseif ( is_language( 'es' ) ) { // do something for Spanish language... }

Ratings

4.5
8 reviews

Rating breakdown

Details Information

Version

1.2.1

First Released

19 Nov, 2012

Total Downloads

11,864

Wordpress Version

3.2 or higher

Tested up to:

5.1.3

Require PHP Version:

-

Tags

Contributors

Languages

The plugin hasn't been transalated in any language other than English.

DIRECTORY DISCLAIMER

The information provided in this THEME/PLUGIN DIRECTORY is made available for information purposes only, and intended to serve as a resource to enable visitors to select a relevant theme or plugin. wpSocket gives no warranty of any kind, express or implied with regard to the information, including without limitation any warranty that the particular theme or plugin that you select is qualified on your situation.

The information in the individual theme or plugin displayed in the Directory is provided by the owners and contributors themselves. wpSocket gives no warranty as to the accuracy of the information and will not be liable to you for any loss or damage suffered by you as a consequence of your reliance on the information.

Links to respective sites are offered to assist in accessing additional information. The links may be outdated or broken. Connect to outside sites at your own risk. The Theme/Plugin Directory does not endorse the content or accuracy of any listing or external website.

While information is made available, no guarantee is given that the details provided are correct, complete or up-to-date.

wpSocket is not related to the theme or plugin, and also not responsible and expressly disclaims all liability for, damages of any kind, arising out of the use, reference to, or reliance on, any information or business listed throughout our site.

Keep Leading Your Followers!
Share it for them.