Questo plugin non è stato testato con le ultime 3 versioni principali (major releases) di WordPress. Potrebbe non essere più mantenuto, o supportato, e potrebbe presentare problemi di compatibilità se utilizzato con versioni più recenti di WordPress.

Whale-Kit

Descrizione

Three alternative to standard widget Categories, Recent Posts and Pages. These widgets can be used as short tags:

  1. WK_trem working with categories, post_tag or any taxonomies. Settings from function get_terms().
  2. WK_posts works with posts, pages and any other type of records. Settings from class WP_Query.
  3. WK_pages working pages, posts, and any other type of records. The data received through the function get_pages(). Unlike WK_posts working with tree hierarchical data.

Collapse – hide inactive branches of a tree – can significantly reduce the list categories or pages, Javascript is not used – hide html code.

Plagin supported hierarchical structure, this has its own Walker.

To construct the resulting html code You can used micro-templates.

Description and examples eXtra optsy see plugin page:

wk_terms – categories, tags and other taxonomic

wk_posts adn wk_pages – posts, page

Screenshot

  • Add a widget to the sidebar

  • Categories tree

  • Pages tree

  • Use as a shortcod

Installazione

  1. Unzip and upload folder whale-kit to the /wp-content/plugins/ directory
  2. Activate the plugin through the ‘Plugins’ menu in WordPress
  3. Go to Apperance->Widgets add a widget in the sidebar and configure it.
  4. You can use short tags [wk_posts …] or [wk_terms …] or [wk_pages …] in the text post or page.
  5. You may need to format the SSC, give an example to collapse lists:

    .widget_wk_post_widget ul,
    .widget_wk_pages_widget ul{ border-left: dotted 1px #DEDEDE; }
    .widget_wk_post_widget ul.childs,
    .widget_wk_pages_widget ul.childs{ border-left: dotted 1px #DEDEDE; margin-left: 0.5em;}
    li.page_item>a:before{ content:’-‘ }
    li.page_has_children>a:before { content:’+ ‘ }
    li.current_page_ancestor > a:before { content:’- ‘ }
    li.current_page > a:after { content:’ <‘ }
    li.current_page>a {text-decoration: underline}

    .widget_wk_terms_widget ul{ border-left: dotted 1px #DEDEDE; padding-left: .2em }
    .widget_wk_terms_widget ul.childs { margin-left: 0.5em; }
    li.cat_item>a:before{ content:’ ‘ }
    li.cat_has_children>a:before { content:’+’ }
    li.current_cat > a:before { content:’-‘ }
    li.current_cat > a {text-decoration: underline}
    li.current_cat_ancestor > a:before { content:’-‘ }
    .widget_wk_terms_widget li sup { font-size: 9px; margin: -5px 0 0 5px; vertical-align:top !important; }
    .widget_wk_terms_widget li a{ vertical-align:bottom !important; margin-top: 5px;}

add this code to a file style of the current theme or to include other way

FAQ

Show child categories from the category My_Category id:34

[wk_terms child_of=34]

Show all categories and empty too

[wk_terms hide_empty=0]

Exclude a category 32 and all childs

[wk_terms exclude_tree=array(32)]

Sort categories by count of records

[wk_terms orderby=count order=ASC]
for the widget:
orderby=count&order=ASC

Collapse categories

[wk_terms collapse=1 hierarchical=1]
The collapse of the inactive branches of the tree of categories.

Display tags and specify the number of records

[wk_terms taxonomy=post_tag show_count=1]

Show category and set the font size depending on the number of entries in the category

[wk_terms show_count=1 size_of_count=1 smallest=8 largest=22 unit=px]

Show 5 records out of category id:56, exclude category id:23

[wk_posts cat=56,-23 posts_per_page=5]
for the widget:
cat=56,-23&posts_per_page=5

Show entries with thumbnail

[wk_posts meta_key=_thumbnail_id show_thumbnail=60?60 /]
for the widget:
meta_key=_thumbnail_id&show_thumbnail=60?60
*none_thumbnai – plug, if the record does not have a thumbnail, then specify the id attachment

Custom Field Query

for the widget write all in one line:
meta_key=color&meta_value=blue&meta_compare=<=&posts_per_page=5
or per line of name = value pairs:

meta_key=color
meta_value=blue
meta_compare=<=
posts_per_page=5
Multiple Custom Field Handling

[wk_posts
tax_query=’array(
“relation”=>”AND”,
array(
“taxonomy” => “category”,
“field” => “id”,
“terms” => array(16)
),
array(
“taxonomy” => “post_tag”,
“field” => “slug”,
“terms” => array(“test_wk”)
)
)’
/]

for the widget write all in one line !newline is not allowed here:
tax_query=array( “relation”=>”AND”, array( “taxonomy” => “category”, “field” => “id”, “terms” => array(16) ), array( “taxonomy” => “post_tag”, “field” => “slug”, “terms” => array(“test_wk”) ) )

Show child pages to 567 pages

[wk_pages child_of=567]

Collapse and sorting pages

[wk_pages collapse=1 sort_column=menu_order sort_order=ASC]
for the widget:

collapse=1
sort_column=menu_order
sort_order=ASC

Recensioni

Non ci sono revisioni per questo plugin.

Contributi e sviluppo

“Whale-Kit” è un software open source. Le persone che hanno contribuito allo sviluppo di questo plugin sono indicate di seguito.

Collaboratori

Traduci “Whale-Kit” nella tua lingua.

Ti interessa lo sviluppo?

Esplora il Codice segui il Repository SVN iscriviti al Log delle Modifiche. Puoi farlo tramite RSS con un lettore di feed.

Changelog (registro delle modifiche)

1.0

  • Start Projects

1.0.1

  • Fixed bug division by zero in the calculation of the font size.

1.1.0

WK_Pages added to work with hierarchical structures. Added ability to display thumbnails of records.