short-code

Shortcode insert div to content (editor)

Sometimes extra “div’s” are needed …
Insert div via shortcode. It’s easy !

Why would you want to insert div’s?
Standard WordPress wraps all the content in paragraphs ( you know those p tags) however now and then you want two columns or assign a class to a certain part of your content. Or maybe you want to split the page, there are of course different ways to go about, using this snippet is one of them.
[div id="ID" class="CLASS"]xxxx[/div]

Credits go to Neil, I’ve found it at  githhub

Continue reading Shortcode insert div to content (editor)

Shortcodes in widget areas dmv ‘extract’

Stap 1

Er zijn verschillende geluiden dat je hier ‘extract’ niet moet gebruiken.
Weet jij waarom niet? Plaats je reactie bij de comments.

Kopieer de onderstaande code in je function.php

/* Allow shortcodes in widget areas */
function recent_posts_function($atts, $content = null) {
extract(shortcode_atts(array(
'posts' => 1,
), $atts));
Continue reading Shortcodes in widget areas dmv ‘extract’