Flexible Posts Widget - Version 3.0.2

Version Description

  • Bug fix: Added a check to make sure both taxonomy & term are set for tax queries.
Download this release

Release Info

Developer dpe415
Plugin Icon wp plugin Flexible Posts Widget
Version 3.0.2
Comparing to
See all releases

Code changes from version 3.0.1 to 3.0.2

Files changed (2) hide show
  1. flexible-posts-widget.php +3 -3
  2. readme.txt +13 -3
flexible-posts-widget.php CHANGED
@@ -4,7 +4,7 @@ Plugin Name: Flexible Posts Widget
4
  Plugin URI: http://wordpress.org/extend/plugins/flexible-posts-widget/
5
  Author: dpe415
6
  Author URI: http://dpedesign.com
7
- Version: 3.0.1
8
  Description: An advanced posts display widget with many options: get posts by post type, taxonomy & term; sorting & ordering; feature images; custom templates and more.
9
  License: GPL2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -31,7 +31,7 @@ if( !defined('ABSPATH') )
31
  die('-1');
32
 
33
  if( !defined('DPE_FP_Version') )
34
- define( 'DPE_FP_Version', '3.0.1' );
35
 
36
 
37
  // Load the widget on widgets_init
@@ -103,7 +103,7 @@ class DPE_Flexible_Posts_Widget extends WP_Widget {
103
  );
104
 
105
  // Setup the tax & term query based on the user's selection
106
- if ( $taxonomy != 'none' ) {
107
  $args['tax_query'] = array(
108
  array(
109
  'taxonomy' => $taxonomy,
4
  Plugin URI: http://wordpress.org/extend/plugins/flexible-posts-widget/
5
  Author: dpe415
6
  Author URI: http://dpedesign.com
7
+ Version: 3.0.2
8
  Description: An advanced posts display widget with many options: get posts by post type, taxonomy & term; sorting & ordering; feature images; custom templates and more.
9
  License: GPL2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
31
  die('-1');
32
 
33
  if( !defined('DPE_FP_Version') )
34
+ define( 'DPE_FP_Version', '3.0.2' );
35
 
36
 
37
  // Load the widget on widgets_init
103
  );
104
 
105
  // Setup the tax & term query based on the user's selection
106
+ if ( $taxonomy != 'none' && !empty( $term ) ) {
107
  $args['tax_query'] = array(
108
  array(
109
  'taxonomy' => $taxonomy,
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: widget, widgets, posts, categories, tags, recent posts, thumbnails, custom post types, custom taxonomies, feature image
5
  Requires at least: 3.2
6
  Tested up to: 3.5.1
7
- Stable tag: 3.0.1
8
  License: GPL2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,7 +14,7 @@ An advanced posts display widget with many options. Display posts in your sideba
14
 
15
  The default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Post Widget.
16
 
17
- Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually anyway imaginable.
18
 
19
  Version 3.0 is a major enhancement as widgets can now get posts by *BOTH* post type and/or taxonomy & term as well as select *multiple* post types and terms. Previous versions of the plugin only allowed post type OR taxonomy & term queries, not both.
20
 
@@ -35,7 +35,7 @@ Version 3.0 is a major enhancement as widgets can now get posts by *BOTH* post t
35
  1. Activate the plugin through the 'Plugins' menu in WordPress.
36
  1. Go to 'Appearance' > 'Widgets' and place the widget into a sidebar to configure it.
37
 
38
- = To use a customized HTML output template =
39
 
40
  1. Create a folder called `flexible-posts-widget` in the root of your theme folder.
41
  1. Copy `widget.php` from within the plugin's `views` folder into your theme's new `flexible-posts-widget` folder.
@@ -46,6 +46,13 @@ Version 3.0 is a major enhancement as widgets can now get posts by *BOTH* post t
46
 
47
  == Frequently Asked Questions ==
48
 
 
 
 
 
 
 
 
49
  = How can I style the images, titles or other widget output a certain way? =
50
  FPW intentionally does NOT add any styling of it's own. To adjust the font size, color, alignment, image size, etc. of any output from this widget, you'll need to edit your theme's styles.
51
 
@@ -91,6 +98,9 @@ Edit the new file in your theme to your desired HTML layout. Please do not edit
91
 
92
  == Changelog ==
93
 
 
 
 
94
  = 3.0.1 =
95
  * Bug fix: Not able to get all registered post types & taxonomies until after widget init. Had to reorder some code.
96
  * Bug fix: when getting post types for display in widget admin. (Props: @angelfish276).
4
  Tags: widget, widgets, posts, categories, tags, recent posts, thumbnails, custom post types, custom taxonomies, feature image
5
  Requires at least: 3.2
6
  Tested up to: 3.5.1
7
+ Stable tag: 3.0.2
8
  License: GPL2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  The default Recent Posts widget is exceptionally basic. I always find myself in need of a way to easily display a selection of posts from any combination post type or taxonomy. Hence, Flexible Post Widget.
16
 
17
+ Flexible Posts Widget (FPW) is more than just a simple alternative to the default Recent Posts widget. With many per-instance options it is highly customizable and allows advanced users to display the resulting posts virtually any way imaginable.
18
 
19
  Version 3.0 is a major enhancement as widgets can now get posts by *BOTH* post type and/or taxonomy & term as well as select *multiple* post types and terms. Previous versions of the plugin only allowed post type OR taxonomy & term queries, not both.
20
 
35
  1. Activate the plugin through the 'Plugins' menu in WordPress.
36
  1. Go to 'Appearance' > 'Widgets' and place the widget into a sidebar to configure it.
37
 
38
+ = To use a custom HTML output template =
39
 
40
  1. Create a folder called `flexible-posts-widget` in the root of your theme folder.
41
  1. Copy `widget.php` from within the plugin's `views` folder into your theme's new `flexible-posts-widget` folder.
46
 
47
  == Frequently Asked Questions ==
48
 
49
+ = How can I display custom fields (custom meta values) with FPW? =
50
+ You'll want to create a custom HTML template by following [the instructions](http://wordpress.org/extend/plugins/flexible-posts-widget/installation/ "View instructions for creating custom FPW templates") and then you can use the standard WordPress [Custom Field](http://codex.wordpress.org/Custom_Fields "View custom field functions on the WordPress Codex") functions the same way you would if you were editing your theme's other template files.
51
+
52
+ A simple code example for a custom field named "test_field" _might_ look like the following:
53
+ `$test_field_value = get_post_meta( get_the_ID(), 'test_field', true );
54
+ echo $test_field_value;`
55
+
56
  = How can I style the images, titles or other widget output a certain way? =
57
  FPW intentionally does NOT add any styling of it's own. To adjust the font size, color, alignment, image size, etc. of any output from this widget, you'll need to edit your theme's styles.
58
 
98
 
99
  == Changelog ==
100
 
101
+ = 3.0.2 =
102
+ * Bug fix: Added a check to make sure both taxonomy & term are set for tax queries.
103
+
104
  = 3.0.1 =
105
  * Bug fix: Not able to get all registered post types & taxonomies until after widget init. Had to reorder some code.
106
  * Bug fix: when getting post types for display in widget admin. (Props: @angelfish276).