Flexible Posts Widget

Contributors: dpe415
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=DJKSKHJWYAWDU
Tags: widget, widgets, posts, categories, tags, recent posts, thumbnails, custom post types, custom taxonomies, feature image
Requires at least: 3.2
Tested up to: 4.0
Stable tag: 3.4 License: GPL2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

An advanced posts display widget with many options. Display posts in your sidebars any way you’d like!

Description

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.

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.

Features & options

Supported Languages

Installation

  1. Upload the flexible-posts-widget folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. Go to ‘Appearance’ > ‘Widgets’ and place the widget into a sidebar to configure it.

To use a custom HTML output template

  1. Create a folder called flexible-posts-widget in the root folder of the currently active theme.
  2. Copy widget.php from within the plugin’s views folder into your theme’s new flexible-posts-widget folder.
  3. Rename your theme’s widget.php template file to a name of your choice. Example: my-template.php.
  4. Go to ‘Appearance’ > ‘Widgets’ in WordPress to configure an instance of the widget.
  5. In the ‘Template Filename’ field choose the name of the template file you added to your theme. Example: My Template

Frequently Asked Questions

How does the “Comma-separated list of post IDs” work?

The third option (tab) available for getting posts is directly with a list of post IDs. If there is a value in this field, any settings in the “Post Type” or “Taxonomy & Term” tabs will be ignored and all public post types will be queried for the specific post IDs provided. All the other widget options (Display, Thumbnails and Template settings) will still be applied.

How do I find a post’s ID?

Per a WordPress support thread:

Go to Posts in your WordPress admin, and click the post you need the ID of. Then, if you look in the address bar of your browser, you’ll see something like this:

http://example.com/wp-admin/post.php?post=1280&action=edit

The number, in this case 1280, is the post ID.

How can I display custom fields (custom meta values) with FPW?

You’ll want to create a custom HTML template by following the instructions and then you can use the standard WordPress Custom Field functions the same way you would if you were editing your theme’s other template files.

A simple code example for a custom field named “test_field” might look like the following: $test_field_value = get_post_meta( get_the_ID(), 'test_field', true ); echo $test_field_value;

How can I style the images, titles or other widget output a certain way?

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.

Does this plugin/widget insert any styles or scripts into my site?

FPW does not add styles or scripts to your public theme. The plugin is intentionally designed to work within your existing theme. FPW does add one stylesheet and one JavaScript to the Widgets page in wp-admin to help with the administration of any FPWs in use.

Want to add support for another language?

I’d love to support more languages. The plugin’s POT file is available with the download. Feel free to post PO & MO files for your language to a new forum thread and I’ll get them added to the plugin.

Questions, Support & Bug Reports

To get answers to your questions, request help or submit a bug report, please start a new forum thread.

Upgrade Notice

When upgrading from one major version to another (version 1.x to version 2.x to version 3.x, etc), please remember to verify your settings for any existing widgets. Not all settings combinations will be saved after a major release upgrade.

Other Notes

Upgrading from one major version to another

When upgrading between major releases (version 1.x to version 2.x to version 3.x, etc), please remember to verify your settings for any existing widgets. Not all settings combinations will be saved after a major release upgrade.

Future updates & feature requests list

Changelog

3.4

3.3.1

3.3

3.2.2

3.2.1

3.2

3.1.2

3.1.1

3.1

3.0.2

3.0.1

3.0

2.1.1

2.1

2.0

1.0.5

1.0.4

1.0.3

1.0.2

1.0