Link

Lightbox-Plus


A very, very nice WordPress-Lightbox Plugin with a lot of configuration possibilities!

It is updateable, so you can use own css! and  you have varient style options in core.

It’s always about learning


Well – I had a problem today which made my nerves up to something really bad.

I’ve wanted to put contactform7 into my wordpress-theme and I also wanted to gave them some parameters with these special short-tags

so I had these ones: [_post_title] and [_post_url] and always when I submitted the form these tags for itself showed up and not the input I wanted.

I searched for 3 hours now and now I got it.

It’s maybe not the best solution but it works somehow.

I want to put my contactform after every article in single view so you’ve got to put the shortcode tag into single.php:

<?php while ( have_posts() ) : the_post(); ?>
<div>
<?php echo do_shortcode('[contact-form-7 id="xx" title="xx"]'); ?>
</div>
<?php endwhile; ?>;

the shortcode tag has to be in a loop so wordpress can get the information somehow – dunno why but it’s like it.

The last problem I’ve got to fight with is that my mails aren’t UTF-8 encoded. I’ll work on that tomorrow, but for interested people I found this
link – tell me if it was helpfull!

contactform7 UTF8-Solution

Solution for different Gallery-View with WP-Standards


I just wrote about the plugin „Photospace“ which is a nice quick and dirty solution for what I wanted.

But the function of this plugin wasn’t enough for my manners, so I decided to view the code and put it down for my own.

Here’s the solution: (you’ve got to put this in image.php!)

<?php
    $gallery_div = "<div id='$selector' class='gallery  gallery-columns-{$columns} gallery-size-{$size_class}'>";
    echo $gallery_div;

                    $images = get_children( array( 'post_parent' => $post->post_parent, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999 ) );
                    //print_r($images);
                    foreach ($images as $key => $value) {
                        echo '<dl style="float:left;margin-right:10px;">';
                        echo '<dt><a href="?attachment_id='.$key.'#mdbt_attachment"><img src="'.$value->guid.'" style="height:150px; width:150px;" /></a></dt>';
                        echo '</dl>';
                    }    
                    $value++;
                    if ( count ($images) > 1 ) {
                        if ( isset ($images [$key] )) {
                            //url vom nächsten bild holen
                            $next_image = get_attachment_link( $images[$key]->ID);
                        }    
                        else {
                            // hol dir sonst die url vom ersten bild
                            $next_image = get_attachment_link( $images[0]->ID);
                        }            
                    }    
                    else {
                        $next_attachment_url = wp_get_attachment_url();
                    }    

                        //echo '<a href="'.the_permalink().'">'.$image_img_tag.'</a>';

                    /*if ( $images ) :
                        $total_images = count( $images );
                        $image = array_shift( $images );
                        $image_img_tag = wp_get_attachment_image( $image->ID, 'thumbnail' );*/
                ?>

</div>

Would appreciate if someone’s „feedbacking“ me 🙂


I just will write an update because this isn’t the finished version at all! Stay tuned to get the final version soon!
🙂

Calling a widget directly from PHP-Code


I had a problem with this, here’s the solution:

<?php echo do_shortcode("

"); ?>