<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
><channel><title>Hiranthi&#039;s weblog &#187; Tutorials - Hiranthi&#039;s weblog - Weblog van een ondernemende vrouw</title> <atom:link href="http://hiranthi.nl/category/tutorials/feed/" rel="self" type="application/rss+xml" /><link>http://hiranthi.nl</link> <description>Weblog van een ondernemende vrouw</description> <lastBuildDate>Wed, 02 May 2012 09:00:06 +0000</lastBuildDate> <language>nl</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.2</generator> <xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /> <item><title>Google Calendar delen met je opdrachtgevers</title><link>http://hiranthi.nl/ondernemen/google-calendendar-delen-met-je-opdrachtgevers/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=google-calendendar-delen-met-je-opdrachtgevers</link> <comments>http://hiranthi.nl/ondernemen/google-calendendar-delen-met-je-opdrachtgevers/#comments</comments> <pubDate>Wed, 02 May 2012 09:00:06 +0000</pubDate> <dc:creator>famire</dc:creator> <category><![CDATA[Ondernemen]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[Google Apps]]></category> <category><![CDATA[Google Calendar]]></category><guid
isPermaLink="false">http://hiranthi.nl/?p=3415</guid> <description><![CDATA[Een tijd terug ben ik overgestapt naar Google Apps. Niet alleen voor de mail, maar ook voor Google Calendar: een kalender/agenda per opdrachtgever aanmaken en dan eventueel de kalender met de opdrachtgever delen zodat ze zicht hebben in wat wanneer gedaan is etc. Helaas werkte dat niet helemaal zoals verwacht. Ik kon wel e-mailadressen toevoegen [...]]]></description> <content:encoded><![CDATA[<p>Een tijd terug ben ik overgestapt naar Google Apps. Niet alleen voor de mail, maar ook voor Google Calendar: een kalender/agenda per opdrachtgever aanmaken en dan eventueel de kalender met de opdrachtgever delen zodat ze zicht hebben in wat wanneer gedaan is etc.<span
id="more-3415"></span></p><p>Helaas werkte dat niet helemaal zoals verwacht. Ik kon wel e-mailadressen toevoegen om een kalender te delen, maar zodra dat e-mailadres werd toegevoegd kreeg de betreffende gebruiker de minste permissions. En wat ik selecteerde als toegang maakte helemaal niks uit.</p><p>Ik kon me niet voorstellen dat ze hier vanuit Google geen oplossing voor hadden, dus gisteren dan eindelijk eens gezocht (via Google uiteraard <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) en de oplossing gevonden!</p><p>Ga als eerste naar je Google Apps dashboard (iets als https://www.google.com/a/cpanel/domein.nl/Dashboard &#8211; waarbij domein.nl je eigen domeinnaam is) en dan naar <strong>Agenda</strong> (kan gewoon via de link rechtstreeks op je dashboard). Je komt dan terecht op de Agenda instellingen pagina.</p><p>Op de tab <strong>Algemeen</strong> (staat &#8216;ie standaard op) is het tweede kopje <strong>Opties voor delen</strong> en die moeten we hebben. De standaard instelling is <em>Alleen beschikbaar/bezet-informatie (afspraakdetails verbergen)</em>, zet &#8216;m op <strong>Share all information, and outsiders can change calendars</strong>.</p><p><strong>Wees gerust: deze instelling is niet de standaard instelling, maar geeft aan welke toestemming externe gebruikers <em>maximaal</em> kunnen krijgen.</strong></p><p>Log nu uit bij Google Apps en log dan weer in. Nu kun je de toestemming bij het delen hoger zetten! <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/ondernemen/google-calendendar-delen-met-je-opdrachtgevers/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/ondernemen/kijk-uit-met-google-apps/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Kijk uit met domeinnamen toevoegen in Google Apps!" title="Kijk uit met domeinnamen toevoegen in Google Apps!" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/ondernemen/kijk-uit-met-google-apps/" rel="bookmark">Kijk uit met domeinnamen toevoegen in Google Apps!</a></h3><p>Stel, je hebt meerdere websites en maakt voor elk van die verschillende sites een aparte Google account aan (om alles gescheiden te houden). Nadat je ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/update-van-wpo/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Update van WPO" title="Update van WPO" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/update-van-wpo/" rel="bookmark">Update van WPO</a></h3><p>Van de week zag ik dat een bezoeker via een Twitter-pagina op de WordPress Ontwerpers website was binnen gekomen. Uiteraard wilde ik weten hoe er ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/favoriete-seo-plugins-wordpress/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Mijn favoriete SEO plugins voor WordPress" title="Mijn favoriete SEO plugins voor WordPress" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/favoriete-seo-plugins-wordpress/" rel="bookmark">Mijn favoriete SEO plugins voor WordPress</a></h3><p>In deze post ga ik vertellen wat mijn favoriete SEO plugins voor WordPress zijn en ook uitleggen waarom. Google Analyticator Als je de Google Analyticator ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Fondernemen%2Fgoogle-calendendar-delen-met-je-opdrachtgevers%2F&amp;t=Google+Calendar+delen+met+je+opdrachtgevers" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Google+Calendar+delen+met+je+opdrachtgevers%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D3415%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Fondernemen%2Fgoogle-calendendar-delen-met-je-opdrachtgevers%2F&amp;title=Google+Calendar+delen+met+je+opdrachtgevers&amp;notes=Een+tijd+terug+ben+ik+overgestapt+naar+Google+Apps.+Niet+alleen+voor+de+mail%2C+maar+ook+voor+Google+Calendar%3A+een+kalender%2Fagenda+per+opdrachtgever+aanmaken+en+dan+eventueel+de+kalender+met+de+opdrachtgever+delen+zodat+ze+zicht+hebben+in+wat+wanneer+g" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Fondernemen%2Fgoogle-calendendar-delen-met-je-opdrachtgevers%2F&amp;title=Google+Calendar+delen+met+je+opdrachtgevers&amp;bodytext=Een+tijd+terug+ben+ik+overgestapt+naar+Google+Apps.+Niet+alleen+voor+de+mail%2C+maar+ook+voor+Google+Calendar%3A+een+kalender%2Fagenda+per+opdrachtgever+aanmaken+en+dan+eventueel+de+kalender+met+de+opdrachtgever+delen+zodat+ze+zicht+hebben+in+wat+wanneer+g" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Fondernemen%2Fgoogle-calendendar-delen-met-je-opdrachtgevers%2F&amp;title=Google+Calendar+delen+met+je+opdrachtgevers" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/ondernemen/google-calendendar-delen-met-je-opdrachtgevers/" onclick="addBookmark(event);" title="Google Calendar delen met je opdrachtgevers" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Google Calendar delen met je opdrachtgevers&amp;body=Een tijd terug ben ik overgestapt naar Google Apps. Niet alleen voor de mail, maar ook voor Google Calendar: een kalender/agenda per opdrachtgever aanmaken en dan eventueel de kalender met de opdrachtgever delen zodat ze zicht hebben in wat wanneer g - http://hiranthi.nl/ondernemen/google-calendendar-delen-met-je-opdrachtgevers/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/ondernemen/google-calendendar-delen-met-je-opdrachtgevers/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Meerdere WYSIWYG-editors op Content Edit scherm</title><link>http://hiranthi.nl/tutorials/meerdere-wysiwyg-editors-op-content-edit-scherm/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=meerdere-wysiwyg-editors-op-content-edit-scherm</link> <comments>http://hiranthi.nl/tutorials/meerdere-wysiwyg-editors-op-content-edit-scherm/#comments</comments> <pubDate>Fri, 17 Feb 2012 09:27:16 +0000</pubDate> <dc:creator>famire</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[TinyMCE]]></category> <category><![CDATA[wp_editor]]></category> <category><![CDATA[WYSIWYG]]></category><guid
isPermaLink="false">http://hiranthi.nl/?p=3380</guid> <description><![CDATA[Gisteren kreeg ik via Skype (niet helemaal letterlijk) de volgende vraag: Ik heb 2 WYSIWYG-editors in het Content Edit scherm, ik wil ze graag beide apart stijlen. Kan dat? Omdat ik het antwoord niet wist gooide ik meteen Google open en begon te zoeken. Helaas was er niet veel over te vinden. Het enige dat [...]]]></description> <content:encoded><![CDATA[<p>Gisteren kreeg ik via Skype (niet helemaal letterlijk) de volgende vraag:</p><blockquote><p>Ik heb 2 WYSIWYG-editors in het Content Edit scherm, ik wil ze graag beide apart stijlen. Kan dat?</p></blockquote><p>Omdat ik het antwoord niet wist gooide ik meteen Google open en begon te zoeken. Helaas was er niet veel over te vinden. Het enige dat ik tegenkwam was allemaal veroudert (van ergens in 2008 tot halverwege 2011). Toen leek ik wat gevonden te hebben op StackExchange, maar dat bleek niet meer te werken vanaf WordPress 3.1, hadden we dus niks aan.</p><p>Uiteindelijk <a
rel="nofollow" target="_blank" href="http://www.tinymce.com/wiki.php/Configuration:body_class">vond ik wat op de TinyMCE website</a> zelf: je kunt via een var (in de TinyMCE JS) een body_class opgeven. Helemaal geweldig, want dat is wat we nodig hadden. Ik gevraagd of dat toegevoegd kon worden aan de code, maar dat lukte niet echt. Toen gevraagd hoe de editor wordt aangemaakt en toen kreeg ik een verrassend antwoord:</p><pre><pre class="brush: php; gutter: true">&lt;?php
$settings = array (
 &#039;textarea_name&#039; =&gt; &#039;page_sidebar_box&#039;,
 &#039;textarea_rows&#039; =&gt; &#039;8&#039;,
 &#039;media_buttons&#039; =&gt; false,
 &#039;teeny&#039; =&gt; true,
 &#039;wpautop&#039;=&gt; false
);

wp_editor( $page_sidebar_box, &#039;page_sidebar_box&#039;, $settings );

?&gt;</pre></pre><p>Nu vraag je je wellicht af wat het verrassende was aan dat antwoord. Nou, ik kende de <code>[wp]wp_editor[/wp]</code> functie helemaal niet <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> <br
/>Blijkbaar is die functie toegevoegd in WordPress 3.3 (dus best nieuw, niet zo gek dat ik &#8216;m nog niet tegen was gekomen <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ).</p><p>Dus: pagina in de Codex opgezocht en daar zag ik iets heel interessants staan:</p><blockquote><p><strong>tinymce</strong>(<a
rel="nofollow" target="_blank" title="How to Pass Tag Parameters" href="http://codex.wordpress.org/How_to_Pass_Tag_Parameters#Array"><em>array</em></a>) (<em>optional</em>) Load TinyMCE, can be used to pass settings directly to TinyMCE using an array()</p><dl><dd>Default: true</dd></dl></blockquote><p> Dus ik dacht, hee dat combineren we met wat ik op de TinyMCE website had gevonden, wie weet werkt dat wel:</p><pre><pre class="brush: php; gutter: true">
&lt;?php
$settings = array (
 &#039;textarea_name&#039; =&gt; &#039;page_sidebar_box&#039;,
 &#039;textarea_rows&#039; =&gt; &#039;8&#039;,
 &#039;media_buttons&#039; =&gt; false,
 &#039;teeny&#039; =&gt; true,
 &#039;wpautop&#039;=&gt; false,
 &#039;tinymce&#039; =&gt; array(&#039;body_class&#039; =&gt; &#039;my_class&#039;) // &lt;- dit dus toegevoegd
);
?&gt;
</pre></pre><p>En wat denk je? Het werkt! <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_biggrin.gif' alt=':-D' class='wp-smiley' /></p><p><strong>Zo kun je dus een realistischere WYSIWYG beleving geven aan je klanten (of jezelf natuurlijk <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> ) omdat je in de <code>[wp]add_editor_style[/wp]</code> nu ook kunt richten op een specifieke WYSIWYG editor!</strong></p><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/meerdere-wysiwyg-editors-op-content-edit-scherm/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/wysiwyg-editor-theme/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="De WYSIWYG editor bij je theme laten passen" title="De WYSIWYG editor bij je theme laten passen" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/wysiwyg-editor-theme/" rel="bookmark">De WYSIWYG editor bij je theme laten passen</a></h3><p>De WYSIWYG-editor (TinyMCE) van WordPress wil klanten nog weleens in de war brengen. Het gebruikte lettertype (en tekstkleur) kunnen namelijk sterk afwijken van hetgeen op ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/ondernemen/oxilion-rules-nog-altijd/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Oxilion rules nog altijd! :)" title="Oxilion rules nog altijd! :)" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/ondernemen/oxilion-rules-nog-altijd/" rel="bookmark">Oxilion rules nog altijd! :)</a></h3><p>Bijna een jaar geleden schreef ik een post '' en vandaag wou ik even laten weten dat dit nog altijd zo is :D VDS'en Ik ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/ondernemen/op-kleine-voet/" rel="bookmark"><img
src="http://hiranthi.nl/files/2011/09/Schermafbeelding-2011-09-28-om-21.38.08.png" alt="Op Kleine Voet" title="Op Kleine Voet" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/ondernemen/op-kleine-voet/" rel="bookmark">Op Kleine Voet</a></h3><p>Toen onze zoon echt begon te stappen wilden we graag goede schoentjes voor hem kopen. De meeste schoentjes die je in gewone schoenzaken koopt zijn ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmeerdere-wysiwyg-editors-op-content-edit-scherm%2F&amp;t=Meerdere+WYSIWYG-editors+op+Content+Edit+scherm" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Meerdere+WYSIWYG-editors+op+Content+Edit+scherm%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D3380%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmeerdere-wysiwyg-editors-op-content-edit-scherm%2F&amp;title=Meerdere+WYSIWYG-editors+op+Content+Edit+scherm&amp;notes=Gisteren+kreeg+ik+via+Skype+%28niet+helemaal+letterlijk%29+de+volgende+vraag%3A%0D%0A%0D%0AIk+heb+2+WYSIWYG-editors+in+het+Content+Edit+scherm%2C+ik+wil+ze+graag+beide+apart+stijlen.+Kan+dat%3F%0D%0A%0D%0AOmdat+ik+het+antwoord+niet+wist+gooide+ik+meteen+Google+open+en+begon+t" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmeerdere-wysiwyg-editors-op-content-edit-scherm%2F&amp;title=Meerdere+WYSIWYG-editors+op+Content+Edit+scherm&amp;bodytext=Gisteren+kreeg+ik+via+Skype+%28niet+helemaal+letterlijk%29+de+volgende+vraag%3A%0D%0A%0D%0AIk+heb+2+WYSIWYG-editors+in+het+Content+Edit+scherm%2C+ik+wil+ze+graag+beide+apart+stijlen.+Kan+dat%3F%0D%0A%0D%0AOmdat+ik+het+antwoord+niet+wist+gooide+ik+meteen+Google+open+en+begon+t" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmeerdere-wysiwyg-editors-op-content-edit-scherm%2F&amp;title=Meerdere+WYSIWYG-editors+op+Content+Edit+scherm" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/meerdere-wysiwyg-editors-op-content-edit-scherm/" onclick="addBookmark(event);" title="Meerdere WYSIWYG-editors op Content Edit scherm" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Meerdere WYSIWYG-editors op Content Edit scherm&amp;body=Gisteren kreeg ik via Skype (niet helemaal letterlijk) de volgende vraag:Ik heb 2 WYSIWYG-editors in het Content Edit scherm, ik wil ze graag beide apart stijlen. Kan dat?Omdat ik het antwoord niet wist gooide ik meteen Google open en begon t - http://hiranthi.nl/tutorials/meerdere-wysiwyg-editors-op-content-edit-scherm/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/meerdere-wysiwyg-editors-op-content-edit-scherm/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Adresgegevens in de account opslaan</title><link>http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adresgegevens-in-de-account-opslaan</link> <comments>http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/#comments</comments> <pubDate>Tue, 17 Jan 2012 13:00:22 +0000</pubDate> <dc:creator>famire</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[Shopp]]></category><guid
isPermaLink="false">http://hiranthi.nl/?p=3363</guid> <description><![CDATA[Een opdrachtgever van me wilde graag geen adres-velden op de checkout, maar alleen op de account-pagina. Op zich was dat niet zo heel erg moeilijk, velden toevoegen aan account.php en verborgen input-velden met de adresgegevens in checkout.php (Shopp vereist namelijk wel een adres tijdens de checkout). Maar toen kwamen we achter een probleem: het wijzigen [...]]]></description> <content:encoded><![CDATA[<p>Een opdrachtgever van me wilde graag geen adres-velden op de checkout, maar alleen op de account-pagina. Op zich was dat niet zo heel erg moeilijk, velden toevoegen aan account.php en verborgen input-velden met de adresgegevens in checkout.php (Shopp vereist namelijk wel een adres tijdens de checkout).<span
id="more-3363"></span></p><p>Maar toen kwamen we achter een probleem: het wijzigen van de adresgegevens op de account-pagina werkt niet. Het wordt alleen opgeslagen als je op de checkout.php zit.<br
/>Zoeken in de Shopp forums hielp ook niet, daar bleek dat dit al sinds het begin zo is (en er erg veel mensen zijn die dit wel graag willen).</p><p>Het enige dat ik dacht was: &#8220;maar zo moeilijk kan het toch niet zijn?&#8221; En inderdaad: zo moeilijk was het ook niet <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p><h2>De code</h2><p>De volgende code zet je in de functions.php van je theme (of in een aparte plugin -&amp;gt; aangeraden!):</p><pre><pre class="brush: php; gutter: true">function save_address_info()
{
  global $Shopp;

  $Order =&amp;#038; $Shopp-&gt;Order;

  if ( isset($_GET[&#039;acct&#039;]) &amp;#038;&amp; ( $_GET[&#039;acct&#039;] == &#039;account&#039; ) )
  {
    if ( isset($_POST[&#039;billing&#039;]) &amp;#038;&amp; isset($_POST[&#039;shipping&#039;]) )
    {
      // Shipping address
      $Order-&gt;Shipping-&gt;address  = $_POST[&#039;shipping&#039;][&#039;address&#039;];
      $Order-&gt;Shipping-&gt;xaddress  = $_POST[&#039;shipping&#039;][&#039;xaddress&#039;];
      $Order-&gt;Shipping-&gt;city    = $_POST[&#039;shipping&#039;][&#039;city&#039;];
      $Order-&gt;Shipping-&gt;state    = $_POST[&#039;shipping&#039;][&#039;state&#039;];
      $Order-&gt;Shipping-&gt;country  = $_POST[&#039;shipping&#039;][&#039;country&#039;];

      $Order-&gt;Shipping-&gt;save();

      // Billing address
      $Order-&gt;Billing-&gt;address  = $_POST[&#039;billing&#039;][&#039;address&#039;];
      $Order-&gt;Billing-&gt;xaddress  = $_POST[&#039;billing&#039;][&#039;xaddress&#039;];
      $Order-&gt;Billing-&gt;city    = $_POST[&#039;billing&#039;][&#039;city&#039;];
      $Order-&gt;Billing-&gt;state    = $_POST[&#039;billing&#039;][&#039;state&#039;];
      $Order-&gt;Billing-&gt;country  = $_POST[&#039;billing&#039;][&#039;country&#039;];

      $Order-&gt;Billing-&gt;save();
    }
  }
} // end save_address_info
add_action(&#039;shopp_init&#039;,&#039;save_address_info&#039;);</pre></pre><p>En je moet natuurlijk niet vergeten om de velden daadwerkelijk aan je account.php toe te voegen <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /></p><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/bankoverschrijving-met-shopp/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Bankoverschrijving met Shopp" title="Bankoverschrijving met Shopp" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/bankoverschrijving-met-shopp/" rel="bookmark">Bankoverschrijving met Shopp</a></h3><p>Op de Shopp forums is meerdere malen aangegeven dat mensen toch echt wel graag een handmatige betaling (manual payment - standaard bankoverschrijving) willen hebben. Dit ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Colorbox uitschakelen in Shopp" title="Colorbox uitschakelen in Shopp" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/" rel="bookmark">Colorbox uitschakelen in Shopp</a></h3><p>Met Shopp kun je ook andere Lightbox-varianten gebruiken dan de standaard meegeleverde Colorbox (in het verleden was dat Thickbox), maar voor veel mensen is het ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/shopp-php4/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Shopp en PHP4" title="Shopp en PHP4" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/shopp-php4/" rel="bookmark">Shopp en PHP4</a></h3><p>Als je Shopp hebt geprobeerd te installeren op je WordPress installatie met PHP4 heb je waarschijnlijk deze foutmelding te zien gekregen: Parse error: syntax error, ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fadresgegevens-in-de-account-opslaan%2F&amp;t=Adresgegevens+in+de+account+opslaan" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Adresgegevens+in+de+account+opslaan%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D3363%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fadresgegevens-in-de-account-opslaan%2F&amp;title=Adresgegevens+in+de+account+opslaan&amp;notes=Een+opdrachtgever+van+me+wilde+graag+geen+adres-velden+op+de+checkout%2C+maar+alleen+op+de+account-pagina.+Op+zich+was+dat+niet+zo+heel+erg+moeilijk%2C+velden+toevoegen+aan+account.php+en+verborgen+input-velden+met+de+adresgegevens+in+checkout.php+%28Shopp" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fadresgegevens-in-de-account-opslaan%2F&amp;title=Adresgegevens+in+de+account+opslaan&amp;bodytext=Een+opdrachtgever+van+me+wilde+graag+geen+adres-velden+op+de+checkout%2C+maar+alleen+op+de+account-pagina.+Op+zich+was+dat+niet+zo+heel+erg+moeilijk%2C+velden+toevoegen+aan+account.php+en+verborgen+input-velden+met+de+adresgegevens+in+checkout.php+%28Shopp" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fadresgegevens-in-de-account-opslaan%2F&amp;title=Adresgegevens+in+de+account+opslaan" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/" onclick="addBookmark(event);" title="Adresgegevens in de account opslaan" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Adresgegevens in de account opslaan&amp;body=Een opdrachtgever van me wilde graag geen adres-velden op de checkout, maar alleen op de account-pagina. Op zich was dat niet zo heel erg moeilijk, velden toevoegen aan account.php en verborgen input-velden met de adresgegevens in checkout.php (Shopp - http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Maatwerk product aan winkelwagen toevoegen (Shopp 1.1.x)</title><link>http://hiranthi.nl/tutorials/maatwerk-product-aan-winkelwagen-toevoegen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=maatwerk-product-aan-winkelwagen-toevoegen</link> <comments>http://hiranthi.nl/tutorials/maatwerk-product-aan-winkelwagen-toevoegen/#comments</comments> <pubDate>Thu, 28 Jul 2011 09:06:55 +0000</pubDate> <dc:creator>famire</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[E-commerce]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Shopp]]></category> <category><![CDATA[webshop]]></category> <category><![CDATA[winkelwagen]]></category><guid
isPermaLink="false">http://hiranthi.nl/?p=3256</guid> <description><![CDATA[Het kan voorkomen dat je Shopp wilt gebruiken voor de afhandeling van de bestelling/betaling, maar dat je de daadwerkelijke producten niet (allemaal) als product wilt toevoegen. In zo&#8217;n geval is het natuurlijk handig om te weten hoe je producten via PHP in de winkelwagen krijgt. In dit deel van de &#8220;Shopp: maatwerk product in winkelwagen&#8221;-serie [...]]]></description> <content:encoded><![CDATA[<p>Het kan voorkomen dat je Shopp wilt gebruiken voor de afhandeling van de bestelling/betaling, maar dat je de daadwerkelijke producten niet (allemaal) als product wilt toevoegen. In zo&#8217;n geval is het natuurlijk handig om te weten hoe je producten via PHP in de winkelwagen krijgt.<span
id="more-3256"></span></p><p>In dit deel van de &#8220;Shopp: maatwerk product in winkelwagen&#8221;-serie laat ik zien hoe je met een eigen formulier een product aan de winkelwagen kan toevoegen. Met deze code kun je dan inhaken op andere plugins.</p><h2>Het formulier</h2><p>Als eerste maken we het formulier. Je kunt hier het beste een aparte pagina-template voor gebruiken.</p><pre><pre lang="php" class="brush: php; gutter: true">
&lt;form action=&quot;&quot; method=&quot;post&quot;&gt;
&lt;input type=&quot;hidden&quot; name=&quot;ProductName&quot; value=&quot;Naam van Product&quot; &gt;
&lt;input type=&quot;hidden&quot; name=&quot;ProductPrice&quot; value=&quot;10.00&quot; &gt;
&lt;h2&gt;Naam van Product&lt;/h2&gt;

  &lt;big&gt;Prijs:
&lt;php echo money(10.00); ?&gt;&lt;/big&gt;

&lt;label for=&quot;ProductQuantity&quot;&gt;Aantal&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;ProductQuantity&quot; id=&quot;ProductQuantity&quot; value=&quot;1&quot; /&gt;
&lt;input type=&quot;submit&quot; name=&quot;addtocart&quot; value=&quot;In winkelwagen&quot; /&gt;
&lt;/form&gt;
</pre></pre><h3>Uitleg formulier code</h3><p>Zoals je kan zien is de <code>action</code> van dit formulier leeg, hierdoor wordt het formulier verzonden naar de huidige pagina. Vandaar de aparte pagina-template, je kunt de code voor het afhandelen van het verzonden formulier dan bij het formulier zelf houden.</p><pre><pre lang="html" class="brush: php; gutter: true">
&lt;input type=&quot;hidden&quot; name=&quot;ProductName&quot; value=&quot;Naam van Product&quot; &gt;
&lt;input type=&quot;hidden&quot; name=&quot;ProductPrice&quot; value=&quot;10.00&quot; &gt;</pre></pre><p>Deze verborgen velden zijn voor het opgeven van de benodigde gegevens, de naam en de prijs. De prijs wordt hier niet &#8220;op z&#8217;n Nederlands&#8221; neergezet, maar met een punt als scheiding tussen de decimalen en hele getallen. Dit om te verzekeren dat het bedrag juist wordt overgenomen als het product in de winkelwagen wordt gestopt.</p><pre><pre lang="html" class="brush: php; gutter: true">
&lt;h2&gt;Naam van Product&lt;/h2&gt;
</pre></pre><p>Dit lijkt me voor zich spreken. Je geeft de naam van het product wel mee in een verborgen veld, maar voor je bezoekers/klanten is het ook wel zo handig om te weten hoe het product heet.</p><pre><pre lang="php" class="brush: php; gutter: true">&lt;big&gt;Prijs:
&lt;php echo money(10.00); ?&gt;&lt;/big&gt;</pre></pre><p>Je klanten willen natuurlijk ook wel graag weten wat een product dan kost, voor ze het in de winkelwagen stoppen. De <code>money()</code> functie is een Shopp-functie die ervoor zorgt dat de weergave van het bedrag overeenkomt met de valuta van je webshop. In Euro&#8217;s wordt dit dan <code>&amp;euro;10,00</code>.</p><pre><pre lang="html" class="brush: php; gutter: true">

&lt;label for=&quot;ProductQuantity&quot;&gt;Aantal&lt;/label&gt;
&lt;input type=&quot;text&quot; name=&quot;ProductQuantity&quot; id=&quot;ProductQuantity&quot; value=&quot;1&quot; /&gt;
</pre></pre><p>Een invoerveld voor het aantal dat toegevoegd moet worden aan de winkelwagen. Hier kun je uiteraard ook een verborgen veld voor gebruiken waarmee je het aantal dat wordt toegevoegd vastzet.</p><pre><pre lang="html" class="brush: php; gutter: true">
&lt;input type=&quot;submit&quot; name=&quot;addtocart&quot; value=&quot;In winkelwagen&quot; /&gt;
</pre></pre><p>De button die het formulier verzend.</p><h2>Aan winkelwagen toevoegen</h2><p>Met bovenstaande code heb je een leuk formuliertje, maar verder eigenlijk ook niet. We hebben nog code nodig die de verzonden gegevens gaan verwerken.</p><pre><pre lang="php" class="brush: php; gutter: true">&lt;?php

// is het formulier gepost?
if ( isset($_POST[&#039;addtocart&#039;]) )
{
  global $Shopp;
  $Order  =&amp;#038; ShoppOrder();
  $Cart  =&amp;#038; $Order-&gt;Cart;

  $Product          = new Product((time()-1));
  $NewProduct    = new Item($Product,time());

  $NewProduct-&gt;name  = esc_attr($_POST[&#039;ProductName&#039;]); // productnaam
  $NewProduct-&gt;unitprice  = intval($_POST[&#039;ProductPrice&#039;]); // de prijs per product
  $NewProduct-&gt;quantity  = intval($_POST[&#039;ProductQuantity&#039;]); // aantal van het product
  $NewProduct-&gt;taxrate  = shopp_taxrate(); // haal het BTW-percentage uit de Shopp instellingen
  $NewProduct-&gt;taxable  = true; // of het product met BTW belast moet worden of niet (true|false)

  $Cart-&gt;contents[]  = $NewProduct; // voeg het nieuwe product aan de winkelwagen toe
  $Cart-&gt;changed(true); // laat Shopp weten dat de winkelwagen is verandert
}

?&gt;</pre></pre><p>Shopp heeft ook een speciale functie om producten aan de winkelwagen toe te voegen, Adam heeft daar een voorbeeld van in <a
rel="nofollow" target="_blank" href="http://www.mygeeknc.com/shopp/programmatically-adding-items-to-shopps-cart/" title="Programmatically adding items to Shopp’s Cart">een van zijn tutorials</a>, maar ik vind deze manier zelf fijner. Zo heb je meer controle over waar het item in de winkelwagen geplaatst wordt.</p><h2>Custom data per product</h2><p>Wil je graag custom data toevoegen aan je product(en)? Dat kan uiteraard en dat doe je zo (moet boven <code>$Cart-&gt;contents[] = $NewProduct;</code> geplaatst worden):</p><pre><pre lang="php" class="brush: php; gutter: true">&lt;?php
  $NewProduct-&gt;data[&#039;Naam specifiek veld 1&#039;] = esc_attr($_POST[&#039;SpecificField1&#039;]);
  $NewProduct-&gt;data[&#039;Naam specifiek veld 2&#039;] = esc_attr($_POST[&#039;SpecificField2&#039;]);
?&gt;</pre></pre><p>Vergeet niet om de inputs voor deze velden ook toe te voegen aan het formulier (al dan niet met verborgen velden).</p><h2>Verwijderen uit winkelwagen</h2><p>Om het product uit de winkelwagen te verwijderen heb je geen extra code nodig, hier zorgt Shopp zelf voor.</p><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/maatwerk-product-aan-winkelwagen-toevoegen/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/wijzig-titel-n-a-v-shopp-pagina/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Wijzig titel n.a.v. (Shopp) pagina" title="Wijzig titel n.a.v. (Shopp) pagina" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/wijzig-titel-n-a-v-shopp-pagina/" rel="bookmark">Wijzig titel n.a.v. (Shopp) pagina</a></h3><p>De code in kun je in veel meer situaties dan alleen een aparte header/sidebar/footer gebruiken. Bijvoorbeeld om de titel van de pagina aan te passen. ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/producten-op-je-catalog-php/" rel="bookmark"><img
src="http://famire.nl/wp-content/blogs.dir/6/files/2009/11/producten-catalog-412x200.jpg" alt="Producten op je catalog.php" title="Producten op je catalog.php" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/producten-op-je-catalog-php/" rel="bookmark">Producten op je catalog.php</a></h3><p>Een vraag die ik steeds meer tegenkom op de Shopp forums is de volgende: "Hoe geef ik al mijn producten weer op de Shopp indexpagina?". ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/productenwidget-met-thumbnails/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Productenwidget met thumbnails" title="Productenwidget met thumbnails" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/productenwidget-met-thumbnails/" rel="bookmark">Productenwidget met thumbnails</a></h3><p>Bij Shopp zitten een aantal standaard widgets geleverd, inclusief een producten widget. Maar wat deze widget mist is eigenlijk cruciaal voor je webshop: visuele ondersteuning, ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmaatwerk-product-aan-winkelwagen-toevoegen%2F&amp;t=Maatwerk+product+aan+winkelwagen+toevoegen+%28Shopp+1.1.x%29" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Maatwerk+product+aan+winkelwagen+toevoegen+%28Shopp+1.1.x%29%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D3256%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmaatwerk-product-aan-winkelwagen-toevoegen%2F&amp;title=Maatwerk+product+aan+winkelwagen+toevoegen+%28Shopp+1.1.x%29&amp;notes=Het+kan+voorkomen+dat+je+Shopp+wilt+gebruiken+voor+de+afhandeling+van+de+bestelling%2Fbetaling%2C+maar+dat+je+de+daadwerkelijke+producten+niet+%28allemaal%29+als+product+wilt+toevoegen.+In+zo%27n+geval+is+het+natuurlijk+handig+om+te+weten+hoe+je+producten+via+" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmaatwerk-product-aan-winkelwagen-toevoegen%2F&amp;title=Maatwerk+product+aan+winkelwagen+toevoegen+%28Shopp+1.1.x%29&amp;bodytext=Het+kan+voorkomen+dat+je+Shopp+wilt+gebruiken+voor+de+afhandeling+van+de+bestelling%2Fbetaling%2C+maar+dat+je+de+daadwerkelijke+producten+niet+%28allemaal%29+als+product+wilt+toevoegen.+In+zo%27n+geval+is+het+natuurlijk+handig+om+te+weten+hoe+je+producten+via+" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fmaatwerk-product-aan-winkelwagen-toevoegen%2F&amp;title=Maatwerk+product+aan+winkelwagen+toevoegen+%28Shopp+1.1.x%29" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/maatwerk-product-aan-winkelwagen-toevoegen/" onclick="addBookmark(event);" title="Maatwerk product aan winkelwagen toevoegen (Shopp 1.1.x)" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Maatwerk product aan winkelwagen toevoegen (Shopp 1.1.x)&amp;body=Het kan voorkomen dat je Shopp wilt gebruiken voor de afhandeling van de bestelling/betaling, maar dat je de daadwerkelijke producten niet (allemaal) als product wilt toevoegen. In zo'n geval is het natuurlijk handig om te weten hoe je producten via  - http://hiranthi.nl/tutorials/maatwerk-product-aan-winkelwagen-toevoegen/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/maatwerk-product-aan-winkelwagen-toevoegen/feed/</wfw:commentRss> <slash:comments>8</slash:comments> </item> <item><title>Elke taal een eigen sidebar</title><link>http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=elke-taal-een-eigen-sidebar</link> <comments>http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/#comments</comments> <pubDate>Wed, 18 May 2011 12:00:45 +0000</pubDate> <dc:creator>famire</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[sidebars]]></category> <category><![CDATA[vertalen]]></category> <category><![CDATA[WPML]]></category><guid
isPermaLink="false">http://hiranthi.nl/?p=2238</guid> <description><![CDATA[Als je WPML gebruikt in een WordPress website met sidebars, dan wil je die sidebars ook graag mee veranderen als de bezoeker een andere taal selecteert. Om dit te realiseren zul je voor elke taal een eigen sidebar aan moeten maken. Nou kun je natuurlijk de code daarvoor vast in de functions.php zetten, maar als [...]]]></description> <content:encoded><![CDATA[<p>Als je <a
rel="nofollow" target="_blank" href="http://wpml.org/?aid=6111&#038;affiliate_key=CJoK2cWIFnRa" rel="affiliate external">WPML</a> gebruikt in een WordPress website met sidebars, dan wil je die sidebars ook graag mee veranderen als de bezoeker een andere taal selecteert. Om dit te realiseren zul je voor elke taal een eigen sidebar aan moeten maken.<br
/> Nou kun je natuurlijk de code daarvoor vast in de functions.php zetten, maar als jij (of je opdrachtgever etc.) op een later tijdstip besluit om een taal toe te voegen of te verwijderen, dan moet dit ook handmatig gebeuren.</p><h2>Dynamische sidebars per taal</h2><p>Het makkelijkst is dus om sidebars dynamisch aan te laten maken op basis van de talen die geactiveerd zijn. Dat doe je met de volgende code:</p><pre><pre class="brush: php; gutter: true;">&amp;amp;lt;?php

/*
 Register sidebars
*/
if ( function_exists(&#039;register_sidebars&#039;) )
{
    // WPML is active
    if ( function_exists(&#039;icl_get_languages&#039;) )
    {
        foreach ( icl_get_languages(&#039;skip_missing=0&amp;amp;orderby=name&amp;amp;order=asc&#039;) as $lang )
        {
            register_sidebar( array(
                &#039;name&#039;          =&amp;amp;gt; __(sprintf(&#039;%s Sidebar&#039;,strtoupper($lang[&#039;language_code&#039;]))),
                &#039;id&#039;            =&amp;amp;gt; &#039;sidebar-&#039;.$lang[&#039;language_code&#039;],
                &#039;before_widget&#039; =&amp;amp;gt; &#039;&amp;amp;lt;li id=&quot;%1$s&quot;&amp;amp;gt;&#039;,
                &#039;after_widget&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;/li&amp;amp;gt;&#039;,
                &#039;before_title&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;h4&amp;amp;gt;&#039;,
                &#039;after_title&#039;   =&amp;amp;gt; &#039;&amp;amp;lt;/h4&amp;amp;gt;&#039;
            ) );
        }
    }
    // WPML is not active
    else
    {
        register_sidebar( array(
            &#039;name&#039;          =&amp;amp;gt; __(&#039;Sidebar&#039;),
            &#039;id&#039;            =&amp;amp;gt; &#039;sidebar-default&#039;,
            &#039;before_widget&#039; =&amp;amp;gt; &#039;&amp;amp;lt;li id=&quot;%1$s&quot;&amp;amp;gt;&#039;,
            &#039;after_widget&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;/li&amp;amp;gt;&#039;,
            &#039;before_title&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;h4&amp;amp;gt;&#039;,
            &#039;after_title&#039;   =&amp;amp;gt; &#039;&amp;amp;lt;/h4&amp;amp;gt;&#039;
        ) );
    } // end if/else
} // end if

?&amp;amp;gt;</pre></pre><p>Met bovenstaande code zorg je ervoor dat er een standaard sidebar wordt aangemaakt als er geen talen actief zijn.</p><h2>Meerdere sidebars</h2><p>Gebruik je meerdere sidebars en wil je die allemaal vertalen? Dan herhaal je de code binnen in de <code>foreach</code> (de <code>register_sidebar</code> functie dus) en maak je de benodigde wijzigingen (naam &amp; ID van de sidebar).</p><p>Een voorbeeldje van meerdere sidebars vertalen (een standaard sidebar en eentje voor de blogs):</p><pre><pre class="brush: php; gutter: true;">&amp;amp;lt;?php

/*
 Register sidebars
*/
if ( function_exists(&#039;register_sidebars&#039;) )
{
    // WPML is active
    if ( function_exists(&#039;icl_get_languages&#039;) )
    {
        foreach ( icl_get_languages(&#039;skip_missing=0&amp;amp;orderby=name&amp;amp;order=asc&#039;) as $lang )
        {
            register_sidebar( array(
                &#039;name&#039;          =&amp;amp;gt; __(sprintf(&#039;%s Sidebar | Default&#039;,strtoupper($lang[&#039;language_code&#039;]))),
                &#039;id&#039;            =&amp;amp;gt; &#039;sidebar-default-&#039;.$lang[&#039;language_code&#039;],
                &#039;before_widget&#039; =&amp;amp;gt; &#039;&amp;amp;lt;li id=&quot;%1$s&quot;&amp;amp;gt;&#039;,
                &#039;after_widget&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;/li&amp;amp;gt;&#039;,
                &#039;before_title&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;h4&amp;amp;gt;&#039;,
                &#039;after_title&#039;   =&amp;amp;gt; &#039;&amp;amp;lt;/h4&amp;amp;gt;&#039;
            ) );

            register_sidebar( array(
                &#039;name&#039;          =&amp;amp;gt; __(sprintf(&#039;%s Sidebar | Blog&#039;,strtoupper($lang[&#039;language_code&#039;]))),
                &#039;id&#039;            =&amp;amp;gt; &#039;sidebar-blog-&#039;.$lang[&#039;language_code&#039;],
                &#039;before_widget&#039; =&amp;amp;gt; &#039;&amp;amp;lt;li id=&quot;%1$s&quot;&amp;amp;gt;&#039;,
                &#039;after_widget&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;/li&amp;amp;gt;&#039;,
                &#039;before_title&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;h4&amp;amp;gt;&#039;,
                &#039;after_title&#039;   =&amp;amp;gt; &#039;&amp;amp;lt;/h4&amp;amp;gt;&#039;
            ) );
        }
    }
    // WPML is not active
    else
    {
        register_sidebar( array(
            &#039;name&#039;          =&amp;amp;gt; __(&#039;Sidebar | Default&#039;),
            &#039;id&#039;            =&amp;amp;gt; &#039;sidebar-default&#039;,
            &#039;before_widget&#039; =&amp;amp;gt; &#039;&amp;amp;lt;li id=&quot;%1$s&quot;&amp;amp;gt;&#039;,
            &#039;after_widget&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;/li&amp;amp;gt;&#039;,
            &#039;before_title&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;h4&amp;amp;gt;&#039;,
            &#039;after_title&#039;   =&amp;amp;gt; &#039;&amp;amp;lt;/h4&amp;amp;gt;&#039;
        ) );

        register_sidebar( array(
            &#039;name&#039;          =&amp;amp;gt; __(&#039;Sidebar | Blog&#039;),
            &#039;id&#039;            =&amp;amp;gt; &#039;sidebar-blog&#039;,
            &#039;before_widget&#039; =&amp;amp;gt; &#039;&amp;amp;lt;li id=&quot;%1$s&quot;&amp;amp;gt;&#039;,
            &#039;after_widget&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;/li&amp;amp;gt;&#039;,
            &#039;before_title&#039;  =&amp;amp;gt; &#039;&amp;amp;lt;h4&amp;amp;gt;&#039;,
            &#039;after_title&#039;   =&amp;amp;gt; &#039;&amp;amp;lt;/h4&amp;amp;gt;&#039;
        ) );
    } // end if/else
} // end if

?&amp;amp;gt;</pre></pre><h2>Sidebar laden</h2><p>Nou heb je natuurlijk niet zo heel veel aan vertaalde sidebars als je niet ook de juiste sidebar kan laden op de site. Open je sidebar.php en vervang de huidige code om de dynamische sidebar op te halen met de volgende code:</p><pre><pre class="brush: php; gutter: true;">&amp;amp;lt;?php

if ( function_exists(&#039;dynamic_sidebar&#039;) )
{
    // WPML is active
    if ( function_exists(&#039;icl_get_languages&#039;) )
    {
        // only load sidebar if it is active
        if ( is_active_sidebar(&#039;sidebar-&#039;.ICL_LANGUAGE_CODE) ) dynamic_sidebar(&#039;sidebar-&#039;.ICL_LANGUAGE_CODE);
    }
    // WPML is not active
    else
    {
        dynamic_sidebar(&#039;sidebar-default&#039;);
    }
}

?&amp;amp;gt;</pre></pre><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/" rel="bookmark"><img
src="http://hiranthi.nl/files/2010/04/1233418_893570201.jpg" alt="Huidige taal aan body_class toevoegen" title="Huidige taal aan body_class toevoegen" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/" rel="bookmark">Huidige taal aan body_class toevoegen</a></h3><p>Wil jij, net als Karin Bronwasser, graag de huidige taal van WPML aan de body_class toevoegen? Voeg dan de volgende code toe aan je functions.php: ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/aparte-header-sidebar-footer-shopp-paginas/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Aparte header/sidebar/footer voor Shopp pagina&#8217;s" title="Aparte header/sidebar/footer voor Shopp pagina&#8217;s" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/aparte-header-sidebar-footer-shopp-paginas/" rel="bookmark">Aparte header/sidebar/footer voor Shopp pagina&#8217;s</a></h3><p>Shopp gebruikt het [wp]the_content[/wp] gedeelte om de templates (dus de inhoud van de webshop pagina) weer te geven. Aangezien de Shop-pagina een WordPress pagina is ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/je-wordpress-website-in-meerdere-talen/" rel="bookmark"><img
src="http://hiranthi.nl/files/2010/04/1233418_893570201.jpg" alt="Je WordPress website in meerdere talen" title="Je WordPress website in meerdere talen" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/je-wordpress-website-in-meerdere-talen/" rel="bookmark">Je WordPress website in meerdere talen</a></h3><p>Om je WordPress website makkelijk te onderhouden in meerdere talen heb je een plugin nodig, de plugin - van mijn voorkeur - hiervoor is WPML. ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Felke-taal-een-eigen-sidebar%2F&amp;t=Elke+taal+een+eigen+sidebar" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Elke+taal+een+eigen+sidebar%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D2238%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Felke-taal-een-eigen-sidebar%2F&amp;title=Elke+taal+een+eigen+sidebar&amp;notes=Als+je+WPML+gebruikt+in+een+WordPress+website+met+sidebars%2C+dan+wil+je+die+sidebars+ook+graag+mee+veranderen+als+de+bezoeker+een+andere+taal+selecteert.+Om+dit+te+realiseren+zul+je+voor+elke+taal+een+eigen+sidebar+aan+moeten+maken.%0D%0ANou+kun+je+natuur" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Felke-taal-een-eigen-sidebar%2F&amp;title=Elke+taal+een+eigen+sidebar&amp;bodytext=Als+je+WPML+gebruikt+in+een+WordPress+website+met+sidebars%2C+dan+wil+je+die+sidebars+ook+graag+mee+veranderen+als+de+bezoeker+een+andere+taal+selecteert.+Om+dit+te+realiseren+zul+je+voor+elke+taal+een+eigen+sidebar+aan+moeten+maken.%0D%0ANou+kun+je+natuur" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Felke-taal-een-eigen-sidebar%2F&amp;title=Elke+taal+een+eigen+sidebar" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/" onclick="addBookmark(event);" title="Elke taal een eigen sidebar" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Elke taal een eigen sidebar&amp;body=Als je WPML gebruikt in een WordPress website met sidebars, dan wil je die sidebars ook graag mee veranderen als de bezoeker een andere taal selecteert. Om dit te realiseren zul je voor elke taal een eigen sidebar aan moeten maken.
Nou kun je natuur - http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Huidige taal aan body_class toevoegen</title><link>http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=huidige-taal-aan-body_class-toevoegen</link> <comments>http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/#comments</comments> <pubDate>Wed, 11 May 2011 12:00:31 +0000</pubDate> <dc:creator>famire</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[body_class]]></category> <category><![CDATA[WPML]]></category><guid
isPermaLink="false">http://hiranthi.nl/?p=2231</guid> <description><![CDATA[Wil jij, net als Karin Bronwasser, graag de huidige taal van WPML aan de body_class toevoegen? Voeg dan de volgende code toe aan je functions.php: /*  * Desc: add current language to the body_class  */ function language_body_class($classes) {     if ( function_exists(&#039;icl_get_languages&#039;) )         $classes[] = &#039;lang-&#039;.ICL_LANGUAGE_CODE;     return $classes; } // end language_body_class [...]]]></description> <content:encoded><![CDATA[<p>Wil jij, net als <a
rel="nofollow" target="_blank" href="http://twitter.com/#%21/KarinBron/statuses/68249333228773376" target="_blank">Karin Bronwasser</a>, graag de huidige taal van <a
rel="nofollow" target="_blank" href="http://wpml.org/?aid=6111&#038;affiliate_key=CJoK2cWIFnRa" rel="affiliate external">WPML</a> aan de body_class toevoegen? Voeg dan de volgende code toe aan je functions.php:<span
id="more-2231"></span></p><pre><pre class="brush: php; gutter: true;">/*
 * Desc: add current language to the body_class
 */
function language_body_class($classes)
{
    if ( function_exists(&#039;icl_get_languages&#039;) )
        $classes[] = &#039;lang-&#039;.ICL_LANGUAGE_CODE;

    return $classes;
} // end language_body_class
add_filter(&#039;body_class&#039;,&#039;language_body_class&#039;);</pre></pre><p>Bovenstaande code voegt een class lang-XX toe aan de body-tag. Het XX staat dan voor de taalcode van de huidige taal (bijv. nl voor Nederlands, en voor Engels etc.).</p><h2>Waar kan ik dit voor gebruiken?</h2><p>Hiermee kun je gemakkelijk via CSS de stijling voor bepaalde talen aanpassen. Bijvoorbeeld de achtergrond-afbeelding anders maken per taal, of wat je maar wil veranderen in de CSS (op taal-basis) <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/" rel="bookmark"><img
src="http://hiranthi.nl/files/2010/04/1233418_893570201.jpg" alt="Elke taal een eigen sidebar" title="Elke taal een eigen sidebar" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/elke-taal-een-eigen-sidebar/" rel="bookmark">Elke taal een eigen sidebar</a></h3><p>Als je WPML gebruikt in een WordPress website met sidebars, dan wil je die sidebars ook graag mee veranderen als de bezoeker een andere taal ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/je-wordpress-website-in-meerdere-talen/" rel="bookmark"><img
src="http://hiranthi.nl/files/2010/04/1233418_893570201.jpg" alt="Je WordPress website in meerdere talen" title="Je WordPress website in meerdere talen" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/je-wordpress-website-in-meerdere-talen/" rel="bookmark">Je WordPress website in meerdere talen</a></h3><p>Om je WordPress website makkelijk te onderhouden in meerdere talen heb je een plugin nodig, de plugin - van mijn voorkeur - hiervoor is WPML. ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/wordpress-plugin-vertaalbaar/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Je WordPress plugin vertaalbaar maken" title="Je WordPress plugin vertaalbaar maken" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/wordpress-plugin-vertaalbaar/" rel="bookmark">Je WordPress plugin vertaalbaar maken</a></h3><p>Als je een WordPress plugin maakt - voor jezelf, een klant of om in de WordPress Repository op te nemen - dan is het wel ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fhuidige-taal-aan-body_class-toevoegen%2F&amp;t=Huidige+taal+aan+body_class+toevoegen" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Huidige+taal+aan+body_class+toevoegen%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D2231%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fhuidige-taal-aan-body_class-toevoegen%2F&amp;title=Huidige+taal+aan+body_class+toevoegen&amp;notes=Wil+jij%2C+net+als+Karin+Bronwasser%2C+graag+de+huidige+taal+van+WPML+aan+de+body_class+toevoegen%3F+Voeg+dan+de+volgende+code+toe+aan+je+functions.php%3A%0D%0A%2F%2A%0D%0A%C2%A0%2A+Desc%3A+add+current+language+to+the+body_class%0D%0A%C2%A0%2A%2F%0D%0Afunction+language_body_class%28%24classes%29%0D%0A%7B%0D" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fhuidige-taal-aan-body_class-toevoegen%2F&amp;title=Huidige+taal+aan+body_class+toevoegen&amp;bodytext=Wil+jij%2C+net+als+Karin+Bronwasser%2C+graag+de+huidige+taal+van+WPML+aan+de+body_class+toevoegen%3F+Voeg+dan+de+volgende+code+toe+aan+je+functions.php%3A%0D%0A%2F%2A%0D%0A%C2%A0%2A+Desc%3A+add+current+language+to+the+body_class%0D%0A%C2%A0%2A%2F%0D%0Afunction+language_body_class%28%24classes%29%0D%0A%7B%0D" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fhuidige-taal-aan-body_class-toevoegen%2F&amp;title=Huidige+taal+aan+body_class+toevoegen" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/" onclick="addBookmark(event);" title="Huidige taal aan body_class toevoegen" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Huidige taal aan body_class toevoegen&amp;body=Wil jij, net als Karin Bronwasser, graag de huidige taal van WPML aan de body_class toevoegen? Voeg dan de volgende code toe aan je functions.php:
/*
 * Desc: add current language to the body_class
 */
function language_body_class($classes)
{
 - http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/huidige-taal-aan-body_class-toevoegen/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Dropdown navigatie 2.0 in WordPress</title><link>http://hiranthi.nl/tutorials/dropdown-navigatie-2-wordpress/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=dropdown-navigatie-2-wordpress</link> <comments>http://hiranthi.nl/tutorials/dropdown-navigatie-2-wordpress/#comments</comments> <pubDate>Mon, 14 Feb 2011 13:00:48 +0000</pubDate> <dc:creator>hiranthi</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[big menu]]></category> <category><![CDATA[css]]></category> <category><![CDATA[dropdown]]></category> <category><![CDATA[navigatie]]></category> <category><![CDATA[walker]]></category> <category><![CDATA[wp_nav_menu]]></category><guid
isPermaLink="false">http://www.hiranthi.nl/?p=1984</guid> <description><![CDATA[Sander vroeg me in mijn post of er ook ergens een tutorial was voor zo&#8217;n soort menu in WordPress. Ik weet dat Remkus ermee bezig is, maar heb er nog geen tutorial over gezien. Omdat ik zelf al een post had geschreven over de navigatie en HTML/CSS leek het me wel handig om ook een [...]]]></description> <content:encoded><![CDATA[<p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/tutorials/dropdown-navigatie-2/1522.html#comment-404" class="broken_link">Sander</a> vroeg me in mijn <a
href="http://hiranthi.nl/tutorials/dropdown-navigatie-2/">Dropdown navigatie 2.0</a> post of er ook ergens een tutorial was voor zo&#8217;n soort menu in WordPress. Ik weet dat Remkus ermee bezig is, maar heb er nog geen tutorial over gezien.<span
id="more-1984"></span><br
/> Omdat ik zelf al een post had geschreven over de navigatie en HTML/CSS leek het me wel handig om ook een vervolg erop te schrijven: hoe dit toe te voegen aan WordPress <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><h2>Type menu</h2><p>Het soort menu dat we gaan gebruiken is de <code>[wp]wp_nav_menu[/wp]</code>, met andere woorden: het type menu dat je makkelijk kunt aanmaken/aanpassen via Weergave -&amp;gt; Menu&#8217;s (mits je theme dit ondersteund).</p><h2>Menu aanmaken</h2><p>Als je er zeker van bent dat je theme deze menu&#8217;s ondersteund kun je een nieuw menu aanmaken. Als je al een menu hebt kun je die ook gebruiken natuurlijk.</p><p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/files/2011/02/menu-toevoegen1.png" class="lightbox" ><img
class="aligncenter size-large wp-image-2059" src="/files/2011/02/menu-toevoegen1-618x200.png" alt="" width="618" height="200" /></a></p><p>Als je het menu hebt aangemaakt moet deze gekoppeld worden aan een thema locatie. Ik gebruik de theme Twenty Ten op mijn dev-installatie, deze heeft maar 1 thema-locatie.</p><p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/files/2011/02/thema-locatie1.png" class="lightbox" ><img
class="aligncenter size-large wp-image-2061" src="/files/2011/02/thema-locatie1-618x200.png" alt="" width="618" height="200" /></a></p><h3>Menu items aanmaken</h3><p>Als het menu is opgeslagen en gekoppeld aan een thema locatie kunnen we beginnen met items toevoegen aan het menu. Ik heb in dit geval de pagina&#8217;s About, Shop, Cart, Checkout en Your Account toegevoegd.</p><h3>Schermopties aanpassen</h3><p>Wat je zo op het eerste gezicht niet ziet is dat de menu mogelijkheden in WordPress nog leuker zijn dan ze zo al lijken <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> Als je bovenin op schermopties klikt krijg je onderstaande onderdelen te zien. Vink CSS classes en Beschrijving aan.</p><p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/files/2011/02/schermopties1.png" class="lightbox" ><img
class="aligncenter size-large wp-image-2060" src="/files/2011/02/schermopties1-618x200.png" alt="" width="618" height="200" /></a></p><p>Na het aanvinken van deze twee eigenschappen krijg je twee extra invulvelden bij de menu-items (klik op een item om deze uit te klappen):</p><p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/files/2011/02/menu-item.png" class="lightbox" ><img
class="aligncenter size-large wp-image-2058" src="/files/2011/02/menu-item1-618x200.png" alt="" width="618" height="200" /></a></p><p>Je kunt nu dus een CSS class en beschrijving voor dat specifieke menu-item opgeven. Hier onder kun je zien wat ik heb ingevuld voor het menu-item Cart:</p><p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/files/2011/02/cart.png" class="lightbox" ><img
class="aligncenter size-large wp-image-2057" src="/files/2011/02/cart1-618x200.png" alt="" width="618" height="200" /></a></p><p>Vul de velden in voor alle menu-items (waar nodig/gewenst).</p><h2>Weergave menu</h2><p>Op dit moment hebben we een standaard uitklapmenu, mits de CSS in je theme dit ondersteund. Er is nog niks bijzonders aan en de extra informatie is nog niet te zien.</p><p>Om die info weer te geven maken we gebruik van de <code>$walker</code> die <code>[wp]wp_nav_menu[/wp]</code> heeft.</p><p>Open je <code>header.php</code> en zoek de code waarmee het menu wordt toegevoegd. In TwentyTen is dat de volgende regel:</p><pre lang="php">&lt;?php wp_nav_menu( array( &#039;container_class&#039; =&gt; &#039;menu-header&#039;, &#039;theme_location&#039; =&gt; &#039;primary&#039; ) ); ?&gt;</pre><p>Vervang dat met de volgende regel:</p><pre><pre lang="php">&lt;?php
    $walker = new My_Walker_Nav_Menu;
    wp_nav_menu( array( &#039;container_class&#039; =&gt; &#039;menu-header&#039;, &#039;theme_location&#039; =&gt; &#039;primary&#039;, &#039;walker&#039; =&gt; $walker ) );
?&gt;</pre></pre><p><em>Als je geen custom theme gebruikt/aan het maken bent kun je het beste gebruik maken van een <a
rel="nofollow" target="_blank" href="http://wpdimensie.nl/tips-en-trucs/twenty-ten-aanpassen-op-de-juiste-manier.htm">child theme</a>, maar daar ga ik nu verder niet op in.</em></p><h3>De walker aanmaken</h3><p>Om de walker te kunnen gebruiken voor het customizen van de menu-weergave moeten we deze ook aanmaken natuurlijk. Voeg de volgende code toe aan de <code>functions.php</code> van je theme (heb je die niet, maak het bestand dan aan):</p><pre><pre lang="php">&lt;?php
class My_Walker_Nav_Menu extends Walker_Nav_Menu
{
    function end_el(&amp;#038;$output, $item, $depth)
    {
    $output .= &quot;&lt;/li&gt;

\n&quot;;
    } // end end_el

    function start_lvl(&amp;#038;$output, $depth)
    {
        $indent = str_repeat(&quot;t&quot;, $depth);

        $level = $depth+1;
        $output .= &quot;n$indent
&lt;ul class=&quot;children level-$level&quot;&gt;n&quot;; // add level-X as a class for complex CSS possibilities
    } // end start_lvl

    function end_lvl(&amp;#038;$output, $depth)
    {
        $indent = str_repeat(&quot;t&quot;, $depth);
        $output .= &quot;$indent&lt;/ul&gt;

\n&quot;;
    } // end end_lvl

    function start_el(&amp;#038;$output, $item, $depth, $args)
    {
        global $wp_query;

        $indent = ( $depth ) ? str_repeat( &quot;t&quot;, $depth ) : &#039;&#039;;

        $class_names = $value = &#039;&#039;;

        $classes = empty( $item-&gt;classes ) ? array() : (array) $item-&gt;classes;
        $classes[] = &#039;menu-item-&#039; . $item-&gt;ID;

        $class_names = join( &#039; &#039;, apply_filters( &#039;nav_menu_css_class&#039;, array_filter( $classes ), $item ) );
        $class_names = &#039; class=&quot;&#039; . esc_attr( $class_names ) . &#039;&quot;&#039;;

        $id = apply_filters( &#039;nav_menu_item_id&#039;, &#039;menu-item-&#039;. $item-&gt;ID, $item, $args );
        $id = strlen( $id ) ? &#039; id=&quot;&#039; . esc_attr( $id ) . &#039;&quot;&#039; : &#039;&#039;;

        $output .= $indent . &#039;
&lt;li&#039; . $id . $value . $class_names .&#039;&gt;&#039;;

        $attributes  = ! empty( $item-&gt;attr_title ) ? &#039; title=&quot;&#039;  . esc_attr( $item-&gt;attr_title ) .&#039;&quot;&#039; : &#039;&#039;;
        $attributes .= ! empty( $item-&gt;target )     ? &#039; target=&quot;&#039; . esc_attr( $item-&gt;target     ) .&#039;&quot;&#039; : &#039;&#039;;
        $attributes .= ! empty( $item-&gt;xfn )        ? &#039; rel=&quot;&#039;    . esc_attr( $item-&gt;xfn        ) .&#039;&quot;&#039; : &#039;&#039;;
        $attributes .= ! empty( $item-&gt;url )        ? &#039; href=&quot;&#039;   . esc_attr( $item-&gt;url        ) .&#039;&quot;&#039; : &#039;&#039;;

        $item_output = $args-&gt;before;
        $item_output .= &#039;&lt;a&#039;. $attributes .&#039;&gt;&#039;;
        $item_output .= $args-&gt;link_before . apply_filters( &#039;the_title&#039;, $item-&gt;title, $item-&gt;ID ) . $args-&gt;link_after;
        $item_output .= &#039;&lt;/a&gt;&#039;;

        // only display the description if we&#039;re not in the toplevel
        if ( $depth != 0 )
        {
          $item_output .= &#039;
&lt;div class=&quot;desc&quot;&gt;&#039; . $item-&gt;description . &#039;&lt;/div&gt;

&#039;;
        }

        $item_output .= $args-&gt;after;

        $output .= apply_filters( &#039;walker_nav_menu_start_el&#039;, $item_output, $item, $depth, $args );
    } // end start_el
} // end class My_Walker_Nav_Menu
?&gt;</pre></pre><p>Er is niet zo heel veel anders, ten opzichte van de default walker. Ik heb twee dingen toegevoegd:</p><pre><pre lang="php">&lt;?php
        $output .= &quot;n$indent
&lt;ul class=&quot;children level-$level&quot;&gt;n&quot;; // add level-X as a class for complex CSS possibilities
?&gt;</pre></pre><p><em>level-X class toegevoegd, waarbij X het niveau is van het submenu, dit geeft je meer mogelijkheden met CSS.</em></p><pre><pre lang="php">&lt;?php
        // only display the description if we&#039;re not in the toplevel
        if ( $depth != 0 )
        {
          $item_output .= &#039;
&lt;div class=&quot;desc&quot;&gt;&#039; . $item-&gt;description . &#039;&lt;/div&gt;

&#039;;
        }
?&gt;</pre></pre><p><em>De beschrijving van het item alleen weergeven als we niet in het hoogste niveau van het menu zitten.</em></p><h2>Stijling</h2><p>Als je nu de site ververst zul je zien dat het menu er nog niet helemaal geweldig uitziet, dit gaan we aanpassen met CSS. Onderstaande CSS heb ik gekopieerd uit mijn <a
href="http://hiranthi.nl/tutorials/dropdown-navigatie-2/">Dropdown navigatie 2.0</a> tutorial.</p><pre><pre lang="css">
/* dropdown 2.0 */
ul#menu-2-0-navigatie li:hover { background:url(&#039;arrow-top.png&#039;) 10px 30px no-repeat; }
ul#menu-2-0-navigatie li a { color:#bbb; font-weight:bold; }
/* subitems - default */
ul#menu-2-0-navigatie li ul { display:none; position:absolute; top:35px; left:0; width:190px; background-color:#fff; border:1px solid #bbb; border-radius:5px; -moz-border-radius:5px; -webkit-border-radius:5px; padding:5px; -moz-box-shadow: 0 0 .5em #bbb; -webkit-box-shadow: 0 0 .5em #bbb; box-shadow: 0 0 .5em #bbb; /* &gt;= IE8 */ }
ul#menu-2-0-navigatie li:hover ul { display:block; }
ul#menu-2-0-navigatie li ul li { padding:5px; display: block; line-height:normal; height:auto; border-bottom: 1px dotted #bbb; }
ul#menu-2-0-navigatie li ul li:last-child { border: 0; }
ul#menu-2-0-navigatie li ul li a,
ul#menu-2-0-navigatie li ul li:hover a { display:block; background: none; color: #000; }
ul#menu-2-0-navigatie li ul li a { padding: 5px 0;  }
ul#menu-2-0-navigatie li ul li a:hover { text-decoration:underline; }
ul#menu-2-0-navigatie li ul li .desc { font-style: italic; font-family: serif; }
ul#menu-2-0-navigatie li ul li ul { border:0; position:inherit; top:0; box-shadow:0 0 0; -moz-box-shadow:0 0 0; -webkit-box-shadow:0 0 0; border-radius:0; -moz-border-radius:0; -webkit-border-radius:0; }
</pre></pre><p><em>Bovenstaande CSS is voor het menu in TwentyTen, gebruik jij een ander theme? Pas dan de CSS aan aan de ID/classname van je menu. Gebruik voor zulke specifieke CSS (voor een specifiek item) liever niet de standaard <code>.menu</code> class die WP meegeeft.</em></p><p>Met bovenstaande CSS krijg je het volgende resultaat in TwentyTen, nog steeds een redelijk &#8216;basic&#8217; uitklapmenu:</p><p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/files/2011/02/menu-desc1.png" class="lightbox" ><img
src="/files/2011/02/menu-desc1-618x200.png" alt="" width="618" height="200" class="aligncenter size-large wp-image-2069" /></a></p><h3>Customizen</h3><p>Nu is het tijd om de item-specifieke CSS toe te gaan voegen. In mijn geval gaat het om de items met de volgende classes: <code>.cart</code>, <code>.checkout</code> en <code>orders</code>.</p><pre><pre lang="css">
body ul#menu-2-0-navigatie .cart,
body ul#menu-2-0-navigatie .checkout,
body ul#menu-2-0-navigatie .orders {
  padding-left: 40px;
  min-width: 140px;
  min-height: 32px;
}
ul#menu-2-0-navigatie .cart,
ul#menu-2-0-navigatie .cart:hover { background: url(&#039;images/shopping_cart.png&#039;) 0 7px no-repeat; }
ul#menu-2-0-navigatie .checkout,
ul#menu-2-0-navigatie .checkout:hover { background: url(&#039;images/next.png&#039;) 0 7px no-repeat; }
ul#menu-2-0-navigatie .orders,
ul#menu-2-0-navigatie .orders:hover { background: url(&#039;images/user.png&#039;) 0 7px no-repeat; }

body ul#menu-2-0-navigatie .cart a,
body ul#menu-2-0-navigatie .checkout a,
body ul#menu-2-0-navigatie .orders a {
  width: 145px;
}
</pre></pre><p><a
rel="nofollow" target="_blank" href="http://hiranthi.nl/files/2011/02/menu-styled1.png" class="lightbox" ><img
src="/files/2011/02/menu-styled1-618x200.png" alt="" width="618" height="200" class="aligncenter size-large wp-image-2070" /></a></p><p><em>De icons die ik gebruikt heb komen uit het <a
rel="nofollow" target="_blank" href="http://dryicons.com/free-icons/preview/iconika-red-icons/">Iconika Red</a> pakket van DryIcons.com</em></p><h2>Veel meer mogelijk</h2><p>Er zijn nog veel meer dingen mogelijk met de <code>[wp]wp_nav_menu[/wp]</code> en ook de stijling. Vandaar dat ik besloten heb om hier een serie aan toe te wijden.</p><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/dropdown-navigatie-2-wordpress/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/css-dropdown-navigatie/" rel="bookmark"><img
src="http://famire.nl/wp-content/blogs.dir/6/files/2010/02/css-dropdown-alleenhtml-285x200.gif" alt="CSS dropdown navigatie" title="CSS dropdown navigatie" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/css-dropdown-navigatie/" rel="bookmark">CSS dropdown navigatie</a></h3><p>Dropdown navigatie is heel erg hip en niet te vergeten: heel erg handig. Je hoeft niet alle pagina's in beeld te hebben, maar wel alle ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/menu-management-wordpress-3/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Menu Management in WordPress 3.0" title="Menu Management in WordPress 3.0" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/menu-management-wordpress-3/" rel="bookmark">Menu Management in WordPress 3.0</a></h3><p>Ik had het al ergens (kan uiteraard de bron niet meer vinden) gelezen: WordPress 3.0 krijgt een Menu Management. Nu had ik daar al een ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/plugin-more-fields/" rel="bookmark"><img
src="http://famire.nl/wp-content/blogs.dir/6/files/2009/12/more-fields-551x200.jpg" alt="Plugin: More Fields" title="Plugin: More Fields" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/plugin-more-fields/" rel="bookmark">Plugin: More Fields</a></h3><p>Met de More Fields plugin (plugin website) kun je gemakkelijk blokken aanmaken in je Post/Page editor die gebruik maken van de custom fields in WordPress. ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fdropdown-navigatie-2-wordpress%2F&amp;t=Dropdown+navigatie+2.0+in+WordPress" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Dropdown+navigatie+2.0+in+WordPress%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D1984%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fdropdown-navigatie-2-wordpress%2F&amp;title=Dropdown+navigatie+2.0+in+WordPress&amp;notes=Sander+vroeg+me+in+mijn++post+of+er+ook+ergens+een+tutorial+was+voor+zo%27n+soort+menu+in+WordPress.+Ik+weet+dat+Remkus+ermee+bezig+is%2C+maar+heb+er+nog+geen+tutorial+over+gezien.%0D%0A+Omdat+ik+zelf+al+een+post+had+geschreven+over+de+navigatie+en+HTML%2FCSS+" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fdropdown-navigatie-2-wordpress%2F&amp;title=Dropdown+navigatie+2.0+in+WordPress&amp;bodytext=Sander+vroeg+me+in+mijn++post+of+er+ook+ergens+een+tutorial+was+voor+zo%27n+soort+menu+in+WordPress.+Ik+weet+dat+Remkus+ermee+bezig+is%2C+maar+heb+er+nog+geen+tutorial+over+gezien.%0D%0A+Omdat+ik+zelf+al+een+post+had+geschreven+over+de+navigatie+en+HTML%2FCSS+" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fdropdown-navigatie-2-wordpress%2F&amp;title=Dropdown+navigatie+2.0+in+WordPress" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/dropdown-navigatie-2-wordpress/" onclick="addBookmark(event);" title="Dropdown navigatie 2.0 in WordPress" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Dropdown navigatie 2.0 in WordPress&amp;body=Sander vroeg me in mijn  post of er ook ergens een tutorial was voor zo'n soort menu in WordPress. Ik weet dat Remkus ermee bezig is, maar heb er nog geen tutorial over gezien.
Omdat ik zelf al een post had geschreven over de navigatie en HTML/CSS  - http://hiranthi.nl/tutorials/dropdown-navigatie-2-wordpress/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/dropdown-navigatie-2-wordpress/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Colorbox uitschakelen in Shopp</title><link>http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=colorbox-uitschakelen-shopp</link> <comments>http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/#comments</comments> <pubDate>Fri, 03 Dec 2010 13:00:01 +0000</pubDate> <dc:creator>hiranthi</dc:creator> <category><![CDATA[Shopp FAQ]]></category> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[Colorbox]]></category> <category><![CDATA[E-commerce]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[Shopp]]></category> <category><![CDATA[webshop]]></category> <category><![CDATA[zoom]]></category> <category><![CDATA[zoomfx]]></category><guid
isPermaLink="false">http://www.hiranthi.nl/?p=1980</guid> <description><![CDATA[Met Shopp kun je ook andere Lightbox-varianten gebruiken dan de standaard meegeleverde Colorbox (in het verleden was dat Thickbox), maar voor veel mensen is het niet duidelijk hoe je dat dan precies doet. Het is niet zo heel moeilijk, het enige dat je hoeft te doen is de volgende code aan je functions.php toevoegen: &#60;?php [...]]]></description> <content:encoded><![CDATA[<p>Met Shopp kun je ook andere Lightbox-varianten gebruiken dan de standaard meegeleverde Colorbox (in het verleden was dat Thickbox), maar voor veel mensen is het niet duidelijk hoe je dat dan precies doet.<span
id="more-1980"></span></p><p>Het is niet zo heel moeilijk, het enige dat je hoeft te doen is de volgende code aan je functions.php toevoegen:</p><pre><pre lang="php">&lt;?php
if ( is_plugin_active(&#039;shopp/Shopp.php&#039;) )
{
    shopp_deregister_script(&#039;colorbox&#039;); // het script niet meer laden
    wp_deregister_style(&#039;shopp.colorbox&#039;); // het css bestand is dan uiteraard ook niet meer nodig
}
?&gt;</pre></pre><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/bankoverschrijving-met-shopp/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Bankoverschrijving met Shopp" title="Bankoverschrijving met Shopp" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/bankoverschrijving-met-shopp/" rel="bookmark">Bankoverschrijving met Shopp</a></h3><p>Op de Shopp forums is meerdere malen aangegeven dat mensen toch echt wel graag een handmatige betaling (manual payment - standaard bankoverschrijving) willen hebben. Dit ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/" rel="bookmark"><img
src="http://hiranthi.nl/files/2010/11/1071220_supermarket_pushcart_021.jpg" alt="Adresgegevens in de account opslaan" title="Adresgegevens in de account opslaan" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/adresgegevens-in-de-account-opslaan/" rel="bookmark">Adresgegevens in de account opslaan</a></h3><p>Een opdrachtgever van me wilde graag geen adres-velden op de checkout, maar alleen op de account-pagina. Op zich was dat niet zo heel erg moeilijk, ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/aparte-header-sidebar-footer-shopp-paginas/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Aparte header/sidebar/footer voor Shopp pagina&#8217;s" title="Aparte header/sidebar/footer voor Shopp pagina&#8217;s" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/aparte-header-sidebar-footer-shopp-paginas/" rel="bookmark">Aparte header/sidebar/footer voor Shopp pagina&#8217;s</a></h3><p>Shopp gebruikt het [wp]the_content[/wp] gedeelte om de templates (dus de inhoud van de webshop pagina) weer te geven. Aangezien de Shop-pagina een WordPress pagina is ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Fshopp-faq%2Fcolorbox-uitschakelen-shopp%2F&amp;t=Colorbox+uitschakelen+in+Shopp" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Colorbox+uitschakelen+in+Shopp%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D1980%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Fshopp-faq%2Fcolorbox-uitschakelen-shopp%2F&amp;title=Colorbox+uitschakelen+in+Shopp&amp;notes=Met+Shopp+kun+je+ook+andere+Lightbox-varianten+gebruiken+dan+de+standaard+meegeleverde+Colorbox+%28in+het+verleden+was+dat+Thickbox%29%2C+maar+voor+veel+mensen+is+het+niet+duidelijk+hoe+je+dat+dan+precies+doet.%0AHet+is+niet+zo+heel+moeilijk%2C+het+enige+dat+j" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Fshopp-faq%2Fcolorbox-uitschakelen-shopp%2F&amp;title=Colorbox+uitschakelen+in+Shopp&amp;bodytext=Met+Shopp+kun+je+ook+andere+Lightbox-varianten+gebruiken+dan+de+standaard+meegeleverde+Colorbox+%28in+het+verleden+was+dat+Thickbox%29%2C+maar+voor+veel+mensen+is+het+niet+duidelijk+hoe+je+dat+dan+precies+doet.%0AHet+is+niet+zo+heel+moeilijk%2C+het+enige+dat+j" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Fshopp-faq%2Fcolorbox-uitschakelen-shopp%2F&amp;title=Colorbox+uitschakelen+in+Shopp" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/" onclick="addBookmark(event);" title="Colorbox uitschakelen in Shopp" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Colorbox uitschakelen in Shopp&amp;body=Met Shopp kun je ook andere Lightbox-varianten gebruiken dan de standaard meegeleverde Colorbox (in het verleden was dat Thickbox), maar voor veel mensen is het niet duidelijk hoe je dat dan precies doet.
Het is niet zo heel moeilijk, het enige dat j - http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/shopp-faq/colorbox-uitschakelen-shopp/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Voeg datum toe aan post inhoud</title><link>http://hiranthi.nl/tutorials/voeg-datum-toe-aan-post-inhoud/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=voeg-datum-toe-aan-post-inhoud</link> <comments>http://hiranthi.nl/tutorials/voeg-datum-toe-aan-post-inhoud/#comments</comments> <pubDate>Mon, 29 Nov 2010 13:00:39 +0000</pubDate> <dc:creator>hiranthi</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[datum]]></category> <category><![CDATA[PHP]]></category> <category><![CDATA[post]]></category><guid
isPermaLink="false">http://www.hiranthi.nl/?p=1959</guid> <description><![CDATA[Soms wil je graag de datum van een post toevoegen aan de inhoud van de post in plaats van in een eigen paragraaf erboven. Meestal omdat dit in die gevallen gewoon mooier staat. Een tijdje geleden wilde ik dit ook bij een klant en dit is de code dat ik ervoor gebruikt heb: &#60;?php add_filter( [...]]]></description> <content:encoded><![CDATA[<p>Soms wil je graag de datum van een post toevoegen aan de inhoud van de post in plaats van in een eigen paragraaf erboven. Meestal omdat dit in die gevallen gewoon mooier staat.<span
id="more-1959"></span></p><p>Een tijdje geleden wilde ik dit ook bij een klant en dit is de code dat ik ervoor gebruikt heb:</p><pre><pre lang="php">&lt;?php
add_filter( &quot;the_content&quot;, &quot;add_date_content&quot; );
function add_date_content ( $content )
{
  if (is_single())
  {
    $content = &#039;

&lt;span class=&quot;date&quot;&gt;&#039;.get_the_date(get_option(&#039;date_format&#039;)).&#039;&lt;/span&gt;&#039; . substr($content, 3);
  }
  return $content;
}
?&gt;</pre></pre><p>De <code>substr</code> functie haalt de eerste drie chars weg, wat over het algemeen de <code>p</code> tag is. Vandaar dus ook de <code>p</code> tag voor de <code>span</code> voor de datum.</p><p>De <code>[wp]get_option[/wp](&#039;date_format&#039;)</code> functie zorgt ervoor dat de datum die wordt weergegeven het format gebruikt dat in de WordPress instellingen is opgegeven.</p><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/voeg-datum-toe-aan-post-inhoud/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/custom-fields/" rel="bookmark"><img
src="http://famire.nl/wp-content/blogs.dir/6/files/2010/08/custom-fields-618x200.jpg" alt="Custom fields" title="Custom fields" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/custom-fields/" rel="bookmark">Custom fields</a></h3><p>Veel plugins en themes maken gebruik van custom fields voor extra functionaliteiten. Maar om die te kunnen gebruiken moet je wel weten hoe je custom ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/wordpress-plugin-vertaalbaar/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Je WordPress plugin vertaalbaar maken" title="Je WordPress plugin vertaalbaar maken" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/wordpress-plugin-vertaalbaar/" rel="bookmark">Je WordPress plugin vertaalbaar maken</a></h3><p>Als je een WordPress plugin maakt - voor jezelf, een klant of om in de WordPress Repository op te nemen - dan is het wel ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/tutorials/producten-op-je-catalog-php/" rel="bookmark"><img
src="http://famire.nl/wp-content/blogs.dir/6/files/2009/11/producten-catalog-412x200.jpg" alt="Producten op je catalog.php" title="Producten op je catalog.php" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/tutorials/producten-op-je-catalog-php/" rel="bookmark">Producten op je catalog.php</a></h3><p>Een vraag die ik steeds meer tegenkom op de Shopp forums is de volgende: "Hoe geef ik al mijn producten weer op de Shopp indexpagina?". ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fvoeg-datum-toe-aan-post-inhoud%2F&amp;t=Voeg+datum+toe+aan+post+inhoud" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Voeg+datum+toe+aan+post+inhoud%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D1959%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fvoeg-datum-toe-aan-post-inhoud%2F&amp;title=Voeg+datum+toe+aan+post+inhoud&amp;notes=Soms+wil+je+graag+de+datum+van+een+post+toevoegen+aan+de+inhoud+van+de+post+in+plaats+van+in+een+eigen+paragraaf+erboven.+Meestal+omdat+dit+in+die+gevallen+gewoon+mooier+staat.%0A%0AEen+tijdje+geleden+wilde+ik+dit+ook+bij+een+klant+en+dit+is+de+code+dat+" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fvoeg-datum-toe-aan-post-inhoud%2F&amp;title=Voeg+datum+toe+aan+post+inhoud&amp;bodytext=Soms+wil+je+graag+de+datum+van+een+post+toevoegen+aan+de+inhoud+van+de+post+in+plaats+van+in+een+eigen+paragraaf+erboven.+Meestal+omdat+dit+in+die+gevallen+gewoon+mooier+staat.%0A%0AEen+tijdje+geleden+wilde+ik+dit+ook+bij+een+klant+en+dit+is+de+code+dat+" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fvoeg-datum-toe-aan-post-inhoud%2F&amp;title=Voeg+datum+toe+aan+post+inhoud" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/voeg-datum-toe-aan-post-inhoud/" onclick="addBookmark(event);" title="Voeg datum toe aan post inhoud" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Voeg datum toe aan post inhoud&amp;body=Soms wil je graag de datum van een post toevoegen aan de inhoud van de post in plaats van in een eigen paragraaf erboven. Meestal omdat dit in die gevallen gewoon mooier staat.Een tijdje geleden wilde ik dit ook bij een klant en dit is de code dat  - http://hiranthi.nl/tutorials/voeg-datum-toe-aan-post-inhoud/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/voeg-datum-toe-aan-post-inhoud/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Een WordPress plugin maken</title><link>http://hiranthi.nl/tutorials/wordpress-plugin-maken/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=wordpress-plugin-maken</link> <comments>http://hiranthi.nl/tutorials/wordpress-plugin-maken/#comments</comments> <pubDate>Fri, 26 Nov 2010 13:00:24 +0000</pubDate> <dc:creator>hiranthi</dc:creator> <category><![CDATA[Tutorials]]></category> <category><![CDATA[WordPress]]></category> <category><![CDATA[WordPress plugin]]></category><guid
isPermaLink="false">http://www.hiranthi.nl/?p=1532</guid> <description><![CDATA[Een WordPress plugin maken is helemaal niet moeilijk en dat ga ik je laten zien in deze post Gegevens plugin Eigenlijk is dit het enige dat je nodig hebt om een plugin te schrijven: &#60;?php /* Plugin Name: Name Of The Plugin Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates Description: A brief description of the Plugin. Version: The Plugin&#039;s [...]]]></description> <content:encoded><![CDATA[<p>Een WordPress plugin maken is helemaal niet moeilijk en dat ga ik je laten zien in deze post <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span
id="more-1532"></span></p><h2>Gegevens plugin</h2><p>Eigenlijk is dit het enige dat je nodig hebt om een plugin te schrijven:</p><pre><pre lang="php">&lt;?php
/*
Plugin Name: Name Of The Plugin
Plugin URI: http://URI_Of_Page_Describing_Plugin_and_Updates
Description: A brief description of the Plugin.
Version: The Plugin&#039;s Version Number, e.g.: 1.0
Author: Name Of The Plugin Author
Author URI: http://URI_Of_The_Plugin_Author
License: A &quot;Slug&quot; license name e.g. GPL2
*/
?&gt;
</pre></pre><p>Als je bovenstaande kopieert, in een <code>.php</code> bestand zet en upload in je plugins map kun je &#8216;m al kiezen bij de Plugins in je WordPress admin <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p><p>Als je deze plugin dan activeert zul je zien dat er helemaal niks gebeurd. Niet zo heel vreemd, want de plugin heeft totaal geen inhoud <img
src='http://hiranthi.nl/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p><h2>Extra informatie</h2><h3>Queries</h3><p>Als je een plugin gaat schrijven is het belangrijk dat je de code zo veilig mogelijk gebruikt, als je bijvoorbeeld gebruik maakt van de <code>&lt;a href=&quot;http://codex.wordpress.org/Function_Reference/wpdb_Class&quot;&gt;$wpdb&lt;/a&gt;</code> class vergeet dan niet om <a
rel="nofollow" target="_blank" href="http://codex.wordpress.org/Function_Reference/wpdb_Class#Protect_Queries_Against_SQL_Injection_Attacks">de query ook voor te bereiden</a>.</p><h3>Meertaligheid</h3><p>Naast je <a
href="http://hiranthi.nl/tutorials/wordpress-theme-vertaalbaar/">themes beschikbaar maken in meerdere talen</a> kun je ook je plugins &#8216;localizen&#8217;. Hoe je dat doet kun je in <a
href="http://hiranthi.nl/tutorials/wordpress-plugin-vertaalbaar/">deze post</a> lezen.</p><h2>De mogelijkheden</h2><p>De mogelijkheden die je hebt met plugins (lees: wat voor soort plugins je kan maken) zijn praktisch eindeloos. Dit is ook wel te zien in het aanbod dat reeds in de <a
rel="nofollow" target="_blank" href="http://wordpress.org/extend/plugins/">WordPress Plugin Directory</a> staat.</p><p>Vergeet niet dat je nog wel eens bedolven zou kunnen worden onder support-requests als je je plugin aan de WordPress Plugin Directory toevoegt (voor feature requests, bug reports etc.).</p><h2>Meer weten over plugins schrijven?</h2><p>Wil je meer weten over het schrijven van je eigen plugin? Dan kan ik je de volgende resources aanraden:</p><ul><li><a
rel="nofollow" target="_blank" href="http://codex.wordpress.org/Writing_a_Plugin">Writing a Plugin</a> &#8211; WordPress Codex</li><li><a
rel="nofollow" target="_blank" href="http://cnjcbs.com/speaking-wordcamp-netherlands-2010">Coen Jacobs zijn presentatie tijdens WordCampNL 2010</a> (over het schrijven van een plugin)</li><li><a
rel="nofollow" target="_blank" href="http://yoast.com/cat/wordpress/">Yoast</a> &#8211; op de website van Joost staan erg veel tips voor het schrijven van (o.a.) plugins</li><li><a
rel="nofollow" target="_blank" href="http://www.smashingmagazine.com/tag/wordpress/">Smashing Magazine</a> over WordPress</li><li><a
rel="nofollow" target="_blank" href="http://freelancefolder.com/13-great-sites-for-wordpress-tips-tutorials-and-hacks/">Deze post van Freelance Folder </a>met links naar 13 sites die over WordPress schrijven (o.a. tips etc)</li></ul><div
class="printfriendly alignleft"><a
href="http://hiranthi.nl/tutorials/wordpress-plugin-maken/?pfstyle=wp" rel="nofollow" ><img
src="//cdn.printfriendly.com/pf-print-icon.gif" alt="Print Friendly"/><span
class="printandpdf printfriendly-text"> Print <img
src="//cdn.printfriendly.com/pf-pdf-icon.gif" alt="Get a PDF version of this webpage" /> PDF </span></a></div><div
id="seo_alrp_related"><br
class=\"clear\" /><h2>Gerelateerde posts</h2><ul><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/wordpress-screenshot-plugin/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="WordPress screenshot plugin" title="WordPress screenshot plugin" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/wordpress-screenshot-plugin/" rel="bookmark">WordPress screenshot plugin</a></h3><p>Ik heb deze post al sinds 12 april jl op m'n lijstje staan om te publiceren, maar nooit de tijd genomen om 'm daadwerkelijk te ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/je-wordpress-website-in-meerdere-talen/" rel="bookmark"><img
src="http://hiranthi.nl/files/2010/04/1233418_893570201.jpg" alt="Je WordPress website in meerdere talen" title="Je WordPress website in meerdere talen" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/je-wordpress-website-in-meerdere-talen/" rel="bookmark">Je WordPress website in meerdere talen</a></h3><p>Om je WordPress website makkelijk te onderhouden in meerdere talen heb je een plugin nodig, de plugin - van mijn voorkeur - hiervoor is WPML. ...</p><br
class=</div></li><li><div
class="seo_alrp_rl_thumb" style="float:left; margin: 0 10px 5px 0; border: 2px solid #eee ; padding: 2px;"><a
href="http://hiranthi.nl/wordpress/plugins-data-importeren-exporteren/" rel="bookmark"><img
src="http://hiranthi.nl/wp-content/plugins/seo-alrp/default_thumbnail.gif" alt="Plugins om data te importeren/exporteren" title="Plugins om data te importeren/exporteren" width="90" height="90" class="seo_alrp_thumb" /></a></div><div
class="seo_alrp_rl_content"><h3><a
href="http://hiranthi.nl/wordpress/plugins-data-importeren-exporteren/" rel="bookmark">Plugins om data te importeren/exporteren</a></h3><p>Soms moet je gegevens van je WordPess site im-/exporteren, bijvoorbeeld als je een site (gedeeltelijk) moet kopiëren. In deze post noem ik een paar WordPress ...</p><br
class=</div></li></ul></div><div
class="wp-socializer 16px"><ul
class="wp-socializer-jump columns-no"><li><a
href="http://www.facebook.com/share.php?u=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fwordpress-plugin-maken%2F&amp;t=Een+WordPress+plugin+maken" title="Share this on Facebook" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Facebook" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -391px; border:0;"/></a></li><li><a
href="http://twitter.com/home?status=Een+WordPress+plugin+maken%20-%20http%3A%2F%2Fhiranthi.nl%3Fp%3D1532%20" title="Tweet this !" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Twitter" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1615px; border:0;"/></a></li><li><a
href="http://delicious.com/post?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fwordpress-plugin-maken%2F&amp;title=Een+WordPress+plugin+maken&amp;notes=Een+WordPress+plugin+maken+is+helemaal+niet+moeilijk+en+dat+ga+ik+je+laten+zien+in+deze+post+%3A%29%0AGegevens+plugin%0AEigenlijk+is+dit+het+enige+dat+je+nodig+hebt+om+een+plugin+te+schrijven%3A%0A" title="Post this on Delicious" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Delicious" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -221px; border:0;"/></a></li><li><a
href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fwordpress-plugin-maken%2F&amp;title=Een+WordPress+plugin+maken&amp;bodytext=Een+WordPress+plugin+maken+is+helemaal+niet+moeilijk+en+dat+ga+ik+je+laten+zien+in+deze+post+%3A%29%0AGegevens+plugin%0AEigenlijk+is+dit+het+enige+dat+je+nodig+hebt+om+een+plugin+te+schrijven%3A%0A" title="Submit this to Digg" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Digg" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -272px; border:0;"/></a></li><li><a
href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fhiranthi.nl%2Ftutorials%2Fwordpress-plugin-maken%2F&amp;title=Een+WordPress+plugin+maken" title="Submit this to StumbleUpon" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="StumbleUpon" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1530px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/tutorials/wordpress-plugin-maken/" onclick="addBookmark(event);" title="Een WordPress plugin maken" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Add to favorites" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -0px; border:0;"/></a></li><li><a
href="mailto:subject=Een WordPress plugin maken&amp;body=Een WordPress plugin maken is helemaal niet moeilijk en dat ga ik je laten zien in deze post :)
Gegevens plugin
Eigenlijk is dit het enige dat je nodig hebt om een plugin te schrijven:
- http://hiranthi.nl/tutorials/wordpress-plugin-maken/" title="Email this" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="Email" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -374px; border:0;"/></a></li><li><a
href="http://hiranthi.nl/feed/rss/" title="Subscribe to RSS" target="_blank" rel="nofollow"><img
src="http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-mask-16px.gif" alt="RSS" style="width:16px; height:16px; background: transparent url(http://hiranthi.famire.nl/wp-content/plugins/wp-socializer/public/social-icons/wp-socializer-sprite-16px.png) no-repeat; background-position:0px -1377px; border:0;"/></a></li></ul><div
class="wp-socializer-clearer"></div></div>]]></content:encoded> <wfw:commentRss>http://hiranthi.nl/tutorials/wordpress-plugin-maken/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic (User agent is rejected)
Content Delivery Network via Amazon Web Services: S3: cdn.hiranthi.nl.s3.amazonaws.com (user agent is rejected)

Served from: hiranthi.nl @ 2012-05-19 06:21:58 -->
