Řízení viditelnosti widgetů – zobrazení pouze na některých stránkách

**Widget Logic**
„http://wordpress.org/extend/plugins/widget-logic/“:http://wordpress.org/extend/plugins/widget-logic/

This plugin gives every widget an extra control field called „Widget logic“ that lets you control the pages that the widget will appear on.
The text field lets you use WP’s Conditional Tags, or any general PHP code.
There is also an option to add a wordpress ‚widget_content‘ filter – this lets you tweak standard widgets to suit your theme without editing plugins and core code.

**Display Widgets**
„http://wordpress.org/plugins/display-widgets/“:http://wordpress.org/plugins/display-widgets/

Change your sidebar content for different pages, categories, custom taxonomies, and WPML languages. Avoid creating multiple sidebars and duplicating widgets by adding check boxes to each widget in the admin which will either show or hide the widgets on every site page. Great for avoiding extra coding and keeping your sidebars clean.

[* http://s.wordpress.org/extend/plugins/display-widgets/screenshot-1.png?r=717402 *]

**Widget Context**
„http://wordpress.org/plugins/widget-context/“:http://wordpress.org/plugins/widget-context/

Widget Context allows you to show or hide widgets on certain sections of your site — front page, posts, pages, archives, search, etc. It also features section targeting by URLs (with wildcard support) for maximum flexibility.

**Dynamic Widgets**
„http://wordpress.org/plugins/dynamic-widgets/“:http://wordpress.org/plugins/dynamic-widgets/

Dynamic Widgets gives you full control on which pages a widget will display. It lets you dynamically show or hide widgets on WordPress pages by setting conditional logic rules on a widget with just a few mouse clicks.

Vyjíždějící panely a okna

**TheThe Sliding Panels**
„http://wordpress.org/extend/plugins/thethe-sliding-panels/“:http://wordpress.org/extend/plugins/thethe-sliding-panels/

Provides 5 types of JavaScript-powered Sliding Panels – Top, Bottom, Left, and Right side panels and a Modal Window floating above the main webpage.

Installing and activating TheThe Sliding Panels plugin on your WordPress site will cause activation of the following widget areas: Top Sliding Panel, Bottom Sliding Panel, Left Sliding Panel, Right Sliding Panel, and Modal Window. You can set all parameters of a panel as well as add any widget into each Sliding Panel/Modal Window widget area.

Use WP Plugins like „Widget Context or Widget Logic“:https://wordpresso.ovx.cz/rizeni-viditelnost-widgetu/ to add logic to the widgets you are placing into the widget areas of the sliding panels.

*Suppressing Cookie* is an advanced option that helps you control your panel/window opening logic. It allows you to keep your Sliding Panels deactivated when some cookie is present on the visitor’s computer.

For example, if you want to display your Modal Window with your Newsletter Opt-In Form only for those visitors who have not been subscribed yet, you can choose to do so. In this case, when someone subscribes to your newsletter, you can set a cookie ‚Subscriber‘ to him. Then, enter this name in the ‚Suppressing Cookie‘ field of the panel. And you are done!

Those visitors who have already subscribed to your newsletter will not see your modal window anymore, while new visitors will continue seeing it until they subscribe.

[* http://s.wordpress.org/extend/plugins/thethe-sliding-panels/screenshot-4.jpg 600×425 *]

Rozbalovací seznam rubrik

**Folding Category List (FoCaL)**
„http://wordpress.org/extend/plugins/folding-category-widget/“:http://wordpress.org/extend/plugins/folding-category-widget/

As your blog gets more and more posts you will inevitably create more categories to keep them organised. Eventually your categories will take up more room on your screen and scroll across many pages.

Folding Category List for WordPress is a plug-in that will only show the top level categories and the current sub-categories. This will save a lot of space on your sidebars for other widgets. Additionally, you can animate the menu as either a drop down horizontal menu or an accordion style vertical menu, both with cool jQuery animations.

– jQuery Animation: Use Suckerfish or Superfish to animate drop down menus! – js included in plugin, just activate from control panel!
– jQuery Animation: Use Simple jQuery Accordion to animate vertical menus! – js included in plugin, just activate from control panel!
– SEO friendly: Add nofollow and descriptions to links.
– Multi-widget: Have as many lists as you need.
– Multi-category: If posts are in multiple categories, you can still control which one to expand, or expand all of them.
– International: Plugin is compatible with translation plugins (qTranslate).
– Control: Change order by category name, id, description, post count or use My Category Order plugin for total control.
– Pages: Expand category list on pages using custom fields.
– Style: There are lots of different options for CSS tags allowing designers to create unique menus.

„Použito na autorově webu »“:http://azuliadesigns.com/focal/

Testování šablony

**Theme-Check**
„http://wordpress.org/extend/plugins/theme-check/“:http://wordpress.org/extend/plugins/theme-check/

The theme check plugin is an easy way to test your theme and make sure it’s up to spec with the latest theme review standards. With it, you can run all the same automated testing tools on your theme that WordPress.org uses for theme submissions.
The tests are run through a simple admin menu and all results are displayed at once. This is very handy for theme developers, or anybody looking to make sure that their theme supports the latest WordPress theme standards and practices.

„Theme Unit Test »“:http://codex.wordpress.org/Theme_Unit_Test

The Theme Unit Test is an XML export of demo data that outlines most of the features built into WordPress, and while being mandatory for WordPress.org themes, it’s a good idea to quickly run through the tests when working with theme markets and client jobs.
With this test you’ll know that your h6 tag is styled, that nested lists are supported, that images and videos won’t break your design layouts and so on. You won’t have requests like “I inserted a right-aligned image in the editor but it’s not right-aligned on the site”.

„Essential Plugins for WordPress Theme Developers »“:http://theme.fm/2011/07/6-essential-plugins-for-wordpress-theme-developers-1006/

Vytvoření a úpravy šablony založené na Twenty Eleven

„Vytvoření odvozené (child) šablony »“:http://wp.tutsplus.com/tutorials/theme-development/creating-a-simple-child-theme-using-twenty-eleven/

Změna stylopisu – barva, písmo, velikost nadpisů, popisky, komentářů, postranní lišty apod.

„[* http://allaboutbasic.files.wordpress.com/2011/06/twenty-eleven1.png?w=630&h=376 *]“:http://allaboutbasic.com/2011/06/15/wordpress-com-theme-twenty-eleven-css-style-sheet-modification-change-site-titledescriptionpost-titlecommentsmenussidebar-and-more/

„Více zde »“:http://allaboutbasic.com/2011/06/15/wordpress-com-theme-twenty-eleven-css-style-sheet-modification-change-site-titledescriptionpost-titlecommentsmenussidebar-and-more/

„Digging Into Twenty Eleven »“:http://theme.fm/2011/07/theme-review-digging-into-twenty-eleven-597/

„Replace/Remove Default Header Image Twenty Eleven Theme »“:http://wpti.ps/functions/replace-remove-header-image-twenty-eleven-theme/

„Sidebar on Single Posts and Pages »“:http://www.transformationpowertools.com/wordpress/twenty-eleven-sidebar-on-single-posts-and-pages

„Adding a Narrow Sidebar on Each Side of TwentyEleven Single Post View »“:http://voodoopress.com/2011/07/adding-a-narrow-sidebar-on-each-side-of-twentyeleven-single-post-view/

„Plugin pro různé změny layoutu a designu Twenty Eleven »“:http://wordpress.org/extend/plugins/twenty-eleven-theme-extensions/
„Twenty Eleven Theme Extensions Plugin »“:http://wordpress.org/extend/plugins/twenty-eleven-theme-extensions/

„Plugin pro 3-sloupcové varianty Twenty Eleven »“:http://zeaks.org/other-stuff/three-column-twenty-eleven-update/

„Jak přidat logo do Twenty Eleven »“:http://zeaks.org/code-snippets/how-to-add-a-logo-to-twenty-eleven-theme/

„Logo a nadpis v Twenty Eleven »“:http://www.transformationpowertools.com/wordpress/logo-and-site-title-twenty-eleven

„How to Override Theme Functions »“:http://venutip.com/content/right-way-override-theme-functions

1. Copy (in full) the function you want to override from the parent theme.
2. Paste it into functions.php in the root of your child theme’s folder. If functions.php doesn’t exist, create it.
3. Rename the function from parent_theme_function to child_theme_function.
4. Deactivate the parent function.
5. Activate the child function.

/—code php
// Removes thematic_blogtitle from the thematic_header phase
function remove_thematic_actions() {
remove_action(‚thematic_header‘,’thematic_blogtitle‘,3);
}
// Call ‚remove_thematic_actions‘ during WP initialization
add_action(‚init‘,’remove_thematic_actions‘);

// Add our custom function to the ‚thematic_header‘ phase
add_action(‚thematic_header‘,’fancy_theme_blogtitle‘, 3);
\—

Modifikace odkazu „více“

**Úprava textu odkazu**

``

**Doplnění obrázku**

/—code php
.moretext {
width: 100px;
height: 45px;
background:url(/images/ilustrace.gif) no-repeat right middle;
padding: 10px 50px 15px 5px}
\—

**Skok na začátek textu**

Standardně odkaz vede na pokračování textu, nacházející se za `` odkazem, toto chování lze změnit umístěním následujícího filtru do *functions.php*

/—code php
function remove_more_jump_link($link) {
$offset = strpos($link, ‚#more-‚);
if ($offset) {
$end = strpos($link, ‚“‚,$offset);
}
if ($end) {
$link = substr_replace($link, “, $offset, $end-$offset);
}
return $link;
}
add_filter(‚the_content_more_link‘, ‚remove_more_jump_link‘);
\—

Lze použít i plugin:

**More Link Modifier**
„http://wordpress.org/extend/plugins/more-link-modifier/“:http://wordpress.org/extend/plugins/more-link-modifier/

A simple plugin that allows you to modify the link that is displayed when you use the Pokračovat ve čtení „Modifikace odkazu „více““

Série pluginů pro spolupráci s Twitterem

**Simple Twitter Connect**
„http://wordpress.org/extend/plugins/simple-twitter-connect/“:http://wordpress.org/extend/plugins/simple-twitter-connect/
„http://ottopress.com/wordpress-plugins/simple-twitter-connect/“:http://ottopress.com/wordpress-plugins/simple-twitter-connect/

Simple Twitter Connect is a series of plugins that let you add any sort of Twitter functionality you like to a WordPress blog. This lets you have an integrated site without a lot of coding, and still letting you customize it exactly the way you’d like.

First, you activate and set up the base plugin, which makes your site have basic Twitter functionality. Then, each of the add-on plugins will let you add small pieces of specific Twitter-related functionality, one by one.

Unlike other Twitter plugins for WordPress, this one helps you create your own Twitter application and identity, so your tweets from here show up as being from Your Blog, not from some plugin system. You’ll never see „posted by Simple Twitter Connect“ in your tweet stream, you’ll see „posted by Your Blog Name“. Great way to drive traffic back to your own site and to see your own Twitter userbase.

Current add-ons

– Login using Twitter
– Comment using Twitter credentials
– Users can auto-tweet their comments
– Tweet button (official one from twitter)
– Tweetmeme button
– Auto-tweet new posts to an account
– Manual Tweetbox after Publish
– Full @anywhere support
– Auto-link all twitter names on the site (with optional hovercards)
– Dashboard Twitter Widget

**Jak přidat automaticky hashtagy**

A standard tweet containing a prefix (such as “New blog post:”), post title and a link to that post is generated automatically by the plugin.To include post categories and tags as hashtags in order to add additional metadata along with the post title add this snippet to your theme’s functions.php:

/—code php
add_filter(‚stc_publish_text‘, ‚add_taxonomies_to_tweets‘, 10, 2);

function add_taxonomies_to_tweets($output, $id) {
if ($cats = get_the_category($id))
foreach ($cats as $c => $cat)
$output = add_taxonomy_hashtag($output, $cat->cat_name);

if ($tags = get_the_tags($id))
foreach ($tags as $t => $tag)
$output = add_taxonomy_hashtag($output, $tag->name);

return $output;
}

function add_taxonomy_hashtag($tweet, $tax) {
if (stripos($tax, ‚ ‚)) // Remove whitespace
$tax = str_replace(‚ ‚, “, $tax);

if (strlen($tweet) + 1 > 140) { // Check if the new tweet is not too long
return $tweet;
} elseif (stripos($tweet, $tax)) { // Replace an existing word with a tag
return str_replace($tax, ‚#‘ . $tax, $tweet);
} elseif (strlen($tweet) + strlen($tax) + 1 < 140) { // or simply append it return $tweet . ' #' . $tax; } return $tweet; } \---

Trvalé odkazy v lokální instalaci XAMP

V lokální instalaci Apache obvykle defaultně nefunguje *mod_rewrite*, tj. obsah *.htaccess* je ignorován, a nastavíte-li si pak user-friendly odkazy např. pomocí /%postname%/, vrací se stránky/příspěvky jako nenalezené s kódem 404.

Napravit to lze změnou v souboru *httpd.conf*, který se nalézá v lokálním adresáři XAMPu *\apache\conf*.

Řádek

/—code php
#LoadModule rewrite_module modules/mod_rewrite.so
\—

stačí odkomentovat (vymazat znak *#*).

Dále je třeba zkonreolovat, zda v části

/—code php
# AllowOverride controls what directives may be placed in .htaccess files.
# It can be „All“, „None“, or any combination of the keywords:
# Options FileInfo AuthConfig Limit
#
AllowOverride All
\—

není zakomentována direktiva *AllowOverride All* (a je v tomto znění).

Po uložení *httpd.conf* a restartu lokálního Apache již WordPress odkazy přepisuje.

Problém s přesměrováním na jinou stránku

Potřebujeme-li v šabloně/pluginu/funkci přesměrovat výstup na jinou stránku, pomocí funkce „wp_redirect“:http://codex.wordpress.org/Function_Reference/wp_redirect nebo přímo přes „header(‚Location: http://www.example.com/‘)“:http://php.net/manual/en/function.header.php, může nastat problém, signalizovaný hláškou **Cannot modify header information – headers already sent by**.

Lze to vyřešit několika způsoby:

1) v php funkcí „ob_start“:http://php.net/manual/en/function.ob-start.php; zde „vysvětlení“:http://brian.moonspot.net/php-ob-start-headers

/—code php
// hned na začátek za úvodní umístíme
ob_end_flush();
?>
\—

2) javascriptem přes „window.location“:http://www.jakpsatweb.cz/javascript/objekt-window.html#location
/—code php



\—

3) pomocí „meta-refresh“:http://www.jakpsatweb.cz/presmerovani.html#meta
/—code php
„; ?>
\—