Skip to content
This repository has been archived by the owner. It is now read-only.
WordPress plugin that adds a widget to display Featured Custom Post Types for the Genesis Framework
PHP JavaScript
Branch: master
Clone or download
Latest commit a596b21 Aug 13, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
includes
languages Fix textdomain and update pot Apr 14, 2015
README.md Pull Req for 2.1.1 Aug 6, 2016
featured-custom-post-type-widget.php Pull Req for 2.1.1 Aug 6, 2016

README.md

Featured Custom Post Type Widget for Genesis

WordPress plugin that adds a widget to display Featured Custom Post Types for the Genesis Framework

Description

WordPress plugin that adds a widget to display Featured Custom Post Types for the Genesis Framework. Supports Custom Taxonomies.

Requirements

Genesis 2.0+

Installation

Upload

  1. Download the latest tagged archive (choose the "zip" option).
  2. Go to the Plugins -> Add New screen and click the Upload tab.
  3. Upload the zipped archive directly.
  4. Go to the Plugins screen and click Activate.

Manual

  1. Download the latest tagged archive (choose the "zip" option).
  2. Unzip the archive.
  3. Copy the folder to your /wp-content/plugins/ directory.
  4. Go to the Plugins screen and click Activate.

Check out the Codex for more information about installing plugins manually.

Git

Using git, browse to your /wp-content/plugins/ directory and clone this repository:

git clone git@github.com:calliaweb/featured-custom-post-type-widget-for-genesis.git

Then go to your Plugins screen and click Activate.

Frequently Asked Questions

If you are having styling issues with the columns, try adding this to your stylesheet:

.widget {
    overflow: hidden;
}

Can I add the featured image to the unordered list of more posts from this category?

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;
}

Credits

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.

Changelog

2.1.1

  • fix: ensure select-box widths will not overrun widget space
  • new: post type displays by name instead of slug
  • new: cat/tax list displays name instead of slug
  • security: improved sanitization and validation

2.1.0

  • 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

2.0.0

  • new feature: display posts in columns within the widget
  • bugfix: ajax list now sorts properly

1.2.0

  • new option for CPT archive link
  • set ajax to load conditionally

1.0.0

  • initial release on GH
You can’t perform that action at this time.