Splitting nextgen gallery form the_content
Want to show the nextgen gallery somewhere else than the rest of the content? Add this to your functions.php // shows the content echo ngg_content_split(“content”); // shows the gallery echo ngg_content_split(“gallery”) function ngg_content_split($get=”content”){ //get the post content $content_data = get_the_content(); //extract shortcode from content preg_match(“/\[ngg([^}]*)\]/”, $content_data ,$matches); $results = $matches[1]; //if shortcode exists in content if (!empty($results) [...]
get the current category from permalink structure
If a post has different categories it seems to be hard to get the chosen category…. The solution: $currentCat= get_query_var(“cat”); $allCats= get_the_category(); foreach ($allCats as $cat){ if ($cat->cat_ID ==$currentCat){ $currentCat=$cat; continue; } } now you have the current category object…
UPDATE:function to extract image as thumbnail from a post
This method is depreciated in favor of the wordpress 2.9 thumbnail functionality. Here is a good tutorial how to implement it. When you want to add an image to your lists of posts you can use this function (paste it into functions.php): function postimage($size=medium) { if ( $images = get_children(array( ‘post_parent’ => get_the_ID(), ‘post_type’ [...]
Gettinging an array of (random) images from nextgen gallery
Nextgen gallery provides some really nice widgets and functionality but sometimes you just want the data without any formatting. In my case i needed to query directly the nextgen gallery database for displaying random images as an div background. Copy this function into your functions.php function ngg_get_search_pictures ($numberPics = NULL) { global $wpdb; $nngquery = [...]

Using multiple domains for one wordpress installation (portal site)
If you have portal site with different sections and different URL’s you van rewrite the url with either Apache rewrites (which is like black magic to me) or less nice php’s header location. If you need a high performance solution you have to deal with Apache’s rewrite if you only need a short hack try the following solution…
How to get duplicate fields in flutter
When using flutter it’s a kind of secret how to get duplicate fields out of flutter again. When using getGroupDuplicates like this tutorial recommends you only get the amount of duplicates but you can’t use the amount result in a for() loop unless you never delete a duplicate. When deleting an item and adding a [...]
WordPress Frameworks
After reading this two (one / two) articles about wordpress theme development frameworks i thought about writing an own comparison of the available frameworks but i never came further than a short concept. Frameworks can be great thing, if you choose the right one for your own background and skills (designer / programmer). After all [...]
