WordPress.org

Ready to get started?Download WordPress

Plugin Directory

!This plugin hasn't been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

Pronamic Page Widget

This plugin makes it easy to add pages as an widget to your sidebars. Developers can easily develop templates for the different page widget on differe

Template Hierarchy

  1. widget-page-{sidebar_id}.php
  2. widget-page-{widget_id}.php
  3. widget-page-{page_slug}.php
  4. widget-page-{page_id}.php
  5. widget-page.php

http://codex.wordpress.org/Template_Hierarchy

Conditional Tags

  • pronamic_is_page_widget When any Pronamic Page Widget is being displayed.

  • pronamic_is_page_widget('pronamic_page-1') When Pronamic Page Widet with id 1 is being displayed.

  • pronamic_is_page_widget_on_sidebar('primary-widget-area') When a Pronamic Page Widget is begin displayed on an sidebar with the id "primary-widget-area"

http://codex.wordpress.org/Conditional_Tags

How to use?

Pronamic Page Widget template

<h2 class="entry-title">
    <?php the_title(); ?>
</h2>

<div class="entry-content">
    <?php the_excerpt(); ?>
</div>

Adjust the excerpth length Example of how you can adjust the excerpt length of the page widgets.

function pronamic_excerpt_length($length) {
    if(pronamic_is_page_widget_on_sidebar('primary-widget-area')) {
        return 250;
    } elseif(pronamic_is_page_widget('pronamic_page-3')) {
        return 100;
    } elseif(pronamic_is_page_widget()) {
        return 50;
    } else {
        return 40;
    }
}

add_filter('excerpt_length', 'pronamic_excerpt_length');

Requires: 3.0 or higher
Compatible up to: 3.0.5
Last Updated: 2011-6-30
Downloads: 2,591

Ratings

5 stars
5 out of 5 stars

Support

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,4,4
100,2,2
100,2,2
100,1,1
100,1,1