Úprava sloupců v administraci

**Codepress Admin Columns**
„http://wordpress.org/plugins/codepress-admin-columns/“:http://wordpress.org/plugins/codepress-admin-columns/

Customise columns on the administration screens for post(types), pages, media, comments, links and users with an easy to use drag-and-drop interface.
Add or remove columns, change their label, change their width and reorder them.

Stránky v administraci ve stromové struktuře

**CMS Tree Page View**
„http://wordpress.org/plugins/cms-tree-page-view/“:http://wordpress.org/plugins/cms-tree-page-view/

Adds a tree view of all pages & custom posts like you view files in Windows Explorer. Get a great overview + options to drag & drop to reorder & option to add multiple pages.

[* http://s.wordpress.org/plugins/cms-tree-page-view/screenshot-1.png?r=779509 *]

Plugin pro vytvoření webu realitní kanceláře

**Real Estate Website Builder**
„http://wordpress.org/plugins/placester/“:http://wordpress.org/plugins/placester/

Create your fully functional real estate website with a single plugin.

**WP-Property – WordPress Powered Real Estate and Property Management**
„http://wordpress.org/plugins/wp-property/“:http://wordpress.org/plugins/wp-property/

This is not a „collection“ of plugins, but one full suite. You will not have to download and match together a plethora of other plugins, in the hopes of them working well together, to have all the features you need.

Čeština pro výchozí šablonu Twenty Thirteen 1.0

Po delší době včera vyšla nová verze pluginu Čeština pro WordPress 0.4 s kompletní lokalizací výchozí šablony Twenty Thirteen 1.0. Kromě samotného překladu obsahuje také upravený font Bitter s podporou českých znaků (díky M). Dále došlo k doplnění překladu fóra bbPress a některým dalším změnám. Pokud nechcete instalovat plugin, tak si můžete stáhnout pouze lokalizované soubory […]

Vyloučení rubriky ze zobrazení přes the_category()

Může se hodit, když nechceme zobrazovat např. nadřazenou rubriku, ale jen podrubriky. Umístíme do functions.php.
/—code php
function the_category_filter($thelist,$separator=‘ ‚) {
// seznam ID rubrik, které se nemají zobrazit
$exclude = array(4, 5);
// create an empty array
$exclude2 = array();

// loop through the excluded IDs and get their actual names
foreach($exclude as $c) {
// store the names in the second array
$exclude2[] = get_cat_name($c);
}

// get the list of categories for the current post
$cats = explode($separator,$thelist);
// create another empty array
$newlist = array();

foreach($cats as $cat) {
// remove the tags from each category
$catname = trim(strip_tags($cat));

// check against the excluded categories
if(!in_array($catname,$exclude2))

// if not in that list, add to the new array
$newlist[] = $cat;
}
// return the new, shortened list
return implode($separator,$newlist);
}

add_filter(‚the_category‘,’the_category_filter‘, 10, 2);
\—

Lokalizace bez externího editoru .po souborů

**Codestyling Localization**
„http://wordpress.org/plugins/codestyling-localization/“:http://wordpress.org/plugins/codestyling-localization/

You can manage and edit all gettext translation files (*.po/*.mo) directly out of WordPress Admin Center without any need of an external editor.

Viz též „Jak přeložit plugin nebo šablonu pro WordPress »“:http://www.janbien.cz/blog/wordpress-lokalizace/

Dohledávání v anglických slovnících a thesaurech

Např. pro „TheFreeDictionary“:http://thefreedictionary.com/ do functions.php přidáme shortcode:

/—code php
function tfd_lookup($atts)
{
$keyword = $atts[‚0‘];
$output = ‚‚ . $keyword . ‚‚;
return $output;
}

add_shortcode(‚tfdl‘, ‚tfd_lookup‘);
\—

a v textu příspěvku pak výraz, které chceme dohledat, označíme příslušným shortcodem:

[tfdl hledaný_výraz]

„Další příklady »“:http://wpcodesnippets.info/blog/five-easy-dictionary-lookup-shortcodes.html

*Můžeme použít i pluginy:*

**Click2Refer Virtual Dictionary**
„http://wordpress.org/plugins/click2refer-virtual-dictionary/“:http://wordpress.org/plugins/click2refer-virtual-dictionary/

Click2Refer plugin lets the blog readers to lookup the Wordnet dictionary just by a double click on the word they want to refer.
This will take in a floating window into your blog upon the first double click.

[* http://s.wordpress.org/extend/plugins/click2refer-virtual-dictionary/screenshot-2.jpg?r=717851 *]

**Double Click Dictionary Look-up**
„http://wordpress.org/plugins/double-click-dictionary-look-up/“:http://wordpress.org/plugins/double-click-dictionary-look-up/

Double click on the screen to highlight a word. This creates a qTip next to the word where when clicked, a pop-up will appear with the Miriam-Webster.com’s definition on the word.

„Top 10 WordPress Dictionary Plugins »“:www.wordpressintegration.com/blog/top-10-wordpress-dictionary-plugins-you-can-use/

Užitečné hooks & filters

**Modify post title when some string exists in the post content**
Add lock icon if there is a member shortcode present in the post content.
Without *$post->ID == $id* not only post title is changed but also menu items and next/previous links.

/—code php
function modify_title($title, $id) {
global $post;
$content = $post->post_content;
if(strpos($content, ‚[member]‘) AND $post->ID == $id) {
$theme_dir = get_bloginfo(‚stylesheet_directory‘);
$lock = ‚ ‚;
$new_title = $title.$lock;
return $new_title;
} else {
return $title;
}
}
add_filter(‚the_title‘, ‚modify_title‘, 10, 2);
\—

**Add extra contact methods to user profiles**

By default, WordPress allow users to enter an AIM name on their profile, but no Facebook and no Twitter names!
In order to add more contact methods to user profile, simply paste this hook in your functions.php file. In this example it will add Facebook and Twitter, but it can be used for any website or service you need.

/—code php
function my_user_contactmethods($user_contactmethods){
$user_contactmethods[‚twitter‘] = ‚Twitter Username‘;
$user_contactmethods[‚facebook‘] = ‚Facebook Username‘;

return $user_contactmethods;
}

add_filter(‚user_contactmethods‘, ‚my_user_contactmethods‘);
\—

**Automatically enable threaded comments**

By default, WordPress do not enable threaded comments. If you want/need to change this, here is a handy code snippet to paste in your functions.php file:

/—code php
function enable_threaded_comments(){
if (!is_admin()) {
if (is_singular() AND comments_open() AND (get_option(‚thread_comments‘) == 1))
wp_enqueue_script(‚comment-reply‘);
}
}

add_action(‚get_header‘, ‚enable_threaded_comments‘);
\—

**Automatically replace words in your posts**

/—code php
function replace_text_wps($text){
$replace = array(
// ‚WORD TO REPLACE‘ => ‚REPLACE WORD WITH THIS‘
‚wordpress‘ => ‚wordpress‚,
‚excerpt‘ => ‚excerpt‚,
‚function‘ => ‚function
);
$text = str_replace(array_keys($replace), $replace, $text);
return $text;
}

add_filter(‚the_content‘, ‚replace_text_wps‘);
add_filter(‚the_excerpt‘, ‚replace_text_wps‘);
\—

**Quick maintenance mode**

/—code php
function cwc_maintenance_mode() {
if ( !current_user_can( ‚edit_themes‘ ) || !is_user_logged_in() ) {
wp_die(‚Maintenance, please come back soon.‘);
}
}
add_action(‚get_header‘, ‚cwc_maintenance_mode‘);
\—

„Zdroj »“:http://www.catswhocode.com/blog/super-useful-wordpress-action-hooks-and-filters

**Přidání boxu pro excerpt (stručný výpis) i do stránek**

/—code php
function enable_page_excerpt() {
add_post_type_support( ‚page‘, ‚excerpt‘ );
}
add_action(‚init‘, ‚enable_page_excerpt‘);
\—

**Deaktivace HTML v komentářích**

/—code php
add_filter(‚pre_comment_content‘, ‚wp_specialchars‘);
\—

„10 Useful WordPress Hook Hacks »“:“http://www.smashingmagazine.com/2009/08/10-useful-wordpress-hook-hacks/

Pexeso a další hry pro WordPress

Tři hry od stejného autora. Velmi použitelné, bohatě konfigurovatelné.

**MyPuzzle Find The Pair (pexeso)**
„http://wordpress.org/plugins/mypuzzle-find-the-pair-a-memory-game/“:http://wordpress.org/plugins/mypuzzle-find-the-pair-a-memory-game/
„http://blog.mypuzzle.org/find-the-pair-for-wordpress/“:http://blog.mypuzzle.org/find-the-pair-for-wordpress/

[* http://s.wordpress.org/extend/plugins/mypuzzle-find-the-pair-a-memory-game/screenshot-1.jpg?r=717396 *]

**MyPuzzle Jigsaw**
„http://wordpress.org/plugins/mypuzzle-jigsaw/“:http://wordpress.org/plugins/mypuzzle-jigsaw/
„http://mypuzzle.org/jigsaw/wordpress.html“:http://mypuzzle.org/jigsaw/wordpress.html

[* http://s.wordpress.org/extend/plugins/mypuzzle-jigsaw/screenshot-1.jpg?r=717395 *]

**MyPuzzle Sliding**
„http://wordpress.org/plugins/mypuzzle-sliding/“:http://wordpress.org/plugins/mypuzzle-sliding/
„http://mypuzzle.org/sliding/wordpress.html“:http://mypuzzle.org/sliding/wordpress.html

[* http://s.wordpress.org/extend/plugins/mypuzzle-sliding/screenshot-1.jpg?r=717395 *]