WordPress plugin that adds a widget to display Featured Custom Post Types for the Genesis Framework
WordPress plugin that adds a widget to display Featured Custom Post Types for the Genesis Framework. Supports Custom Taxonomies.
Genesis 2.0+
- Download the latest tagged archive (choose the "zip" option).
- Go to the Plugins -> Add New screen and click the Upload tab.
- Upload the zipped archive directly.
- Go to the Plugins screen and click Activate.
- Download the latest tagged archive (choose the "zip" option).
- Unzip the archive.
- Copy the folder to your
/wp-content/plugins/
directory. - Go to the Plugins screen and click Activate.
Check out the Codex for more information about installing plugins manually.
Using git, browse to your /wp-content/plugins/ directory and clone this repository:
git clone [email protected]:calliaweb/featured-custom-post-type-widget-for-genesis.git
Then go to your Plugins screen and click Activate.
If you are having styling issues with the columns, try adding this to your stylesheet:
.widget {
overflow: hidden;
}
Yes, now you can, by using a filter. Example:
add_filter( 'featured_custom_post_type_extra_title', 'prefix_add_thumbs_extra_posts', 10, 2 );
function prefix_add_thumbs_extra_posts( $extra_title ) {
$image = get_the_post_thumbnail( get_the_ID(), 'thumbnail', array( 'class' => 'alignleft', 'alt' => the_title_attribute( 'echo=0' ) ) );
$extra_title = sprintf( '<a href="%s">%s%s</a>', get_permalink(), $image, get_the_title() );
return $extra_title;
}
Most of the code in this plugin is from the StudioPress Genesis Featured Post Widget and I've just added Custom Post Type Support.
Thanks to Pete Favelle for adding Custom Taxonomy support.
Thank you to Robin Cornett for all 1.2 and 2.0 improvements and bug fixes.
- added filter for featured post image
- added filter for extra posts list
- bugfix: term archive link works for any term, not just categories
- bugfix: post type archive link works for posts in addition to custom post types
- new feature: display posts in columns within the widget
- bugfix: ajax list now sorts properly
- new option for CPT archive link
- set ajax to load conditionally
- initial release on GH