>
Download This Plugin | |
Download Elegant Themes | |
Name | Pronamic Page Widget |
Version | 1.0.2 |
Author | Pronamic |
Rating | 0 |
Last updated | 2015-02-09 11:35:00 |
Downloads |
2720
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Pronamic Page Widget plugin added 1 bytes of resources to the Home page and 3 bytes of resources to the sample Post page.
Pronamic Page Widget plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Pronamic Page Widget plugin ads no tables to your Wordpress blog database.This plugin is deprecated so Pronamic wil no longer support and maintain this plugin.
If you want to help maintain the plugin, fork it on GitHub and open pull requests.
http://codex.wordpress.org/Template_Hierarchy
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
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');