nextgen width and height abfragen und einfügen

Dienstag, 28. September 2010

<?php
/**
Template Page for the gallery overview

Follow variables are useable :

 $gallery     : Contain all about the gallery
 $images      : Contain all images, path, title
 $pagination  : Contain the pagination content

 You can check the content when you insert the tag <?php var_dump($variable) ?>
 If you would like to show the timestamp of the image ,you can use <?php echo $exif[’created_timestamp’] ?>
**/
?>
<?php if (!defined (’ABSPATH’)) die (’No direct access allowed’); ?><?php if (!empty ($gallery)) : ?>

<div class = “slideshow”>

 <?php foreach ( $images as $image ) : ?>
 
  
    <?php if ( !$image->hidden ) { ?>
    <img title=”<?php echo $image->alttext ?>” alt=”<?php echo $image->alttext ?>” src=”<?php echo $image->imageURL ?>” width = “<?php echo $image->meta_data[’width’]?>” height = “<?php echo $image->meta_data[’height’]?>” />
    <?php } ?>
 <?php if ( $image->hidden ) continue; ?>
 
  <?php endforeach; ?>
</div>
<?php endif; ?>

query_post nach category und meta key

Dienstag, 28. September 2010

<?php query_posts( array(’cat’ => $cat,’meta_key’ => side, ‘meta_value’ =>left ));// Loop Anzeige linke Seite ?>

Mehrere Single.php

Dienstag, 28. September 2010

<?php
if (in_category(’16′)) {include (TEMPLATEPATH . ‘/single-16.php’);
}
else { include (TEMPLATEPATH . ‘/single-01.php’);
}
?>

Exclude Subcategories in a Loop

Donnerstag, 09. September 2010

if ( !function_exists(’fb_filter_child_cats’) ) {
function fb_filter_child_cats( $cats ) {
global $wp_query, $wpdb;

if ( is_category() ) {

// get children ID’s
if ( $excludes = get_categories( “child_of=” . $wp_query->get(’cat’) ) ) {

// set array with ID’s
foreach ( $excludes as $key => $value ) {
$exclude[] = $value->cat_ID;
}
}

// remove child cats
if ( isset($exclude) && is_array($exclude) ) {
$cats .= ” AND ” . $wpdb->prefix . “term_taxonomy.term_id NOT IN (” . implode(”,”, $exclude) . “) “;
}
}

return $cats;
}

if ( !is_admin() ) {
add_filter( ‘posts_where’, ‘fb_filter_child_cats’ );
}
}