Giter VIP home page Giter VIP logo

featured-custom-post-type-widget-for-genesis's Introduction

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 [email protected]: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.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

featured-custom-post-type-widget-for-genesis's People

Contributors

ahnlak avatar bynicolas avatar calliaweb avatar robincornett avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.