Hallo allerseits,
da ich die ausgabe eines plugins an einem bestimmten Ort , und nicht am per Plugin vordefinierten Ort haben möchte hab ich das Plugin eben nochmal im Template aufgerufen und habe die ausgabe nun aber 2 mal vorhanden.
Der Versuch die "default-Ausgabe" über
zu unterbinden funktioniert nicht.
Wenn ich das PHP oberhalb von meinem Aufruf hinschreibe verschwindet es an der Stelle an der ich ja eingebunden haben will.
Wenn ich das PHP darunter notieren sind immer noch beide zu sehen.
Hier mal die Testumgebung:
http://axel.agentur-mai.de/galerie/theate…oatien-hautnah/
Ich bin schon den ganzen tag dran und finde den Trick einfach nicht.
Hat mal jemand eine Idee?
Hier mal die beiden involvierten Dateien:
single.php (dort wird per include die single-product.php aufgerufen)
<?php include (TEMPLATEPATH . '/lib/includes/get-options.php'); ?>
<?php get_header(); ?>
<!-- start intro-wrap -->
<div id="intro-wrap">
<div class="content">
<h1><?php get_parent(); ?></h1>
</div>
</div>
<!-- end intro-wrap -->
<!-- start body-wrap -->
<div id="body-wrap" <?php if (!isset($hide_sidebar[0])) echo 'class="bg"'; ?>>
<ul id="breadcrumb" <?php if (!isset($hide_sidebar[0])) echo 'class="breadcrumb-short"'; else echo 'class="breadcrumb-wide"'; ?> >
<?php breadcrumb(); ?>
</ul>
<div class="clear"></div>
<!-- start left -->
<div id="left" <?php if (!isset($hide_sidebar[0])) echo 'class="left-short"'; else echo 'class="left-wide"'; ?>>
<?php
global $wp_query;
$widgets_area = get_post_meta($wp_query->post->ID, '_widgets_area', true);
?>
<?php if (have_posts()) : ?>
<?php while (have_posts()): the_post();?>
<?php $hide_date = get_post_custom_values('_hide_date'); ?>
<?php $hide_cat = get_post_custom_values('_hide_cat'); ?>
<?php $hide_comments = get_post_custom_values('_hide_comments'); ?>
<?php $hide_author = get_post_custom_values('_hide_author'); ?>
<!-- start entry -->
<div class="entry">
<?php include (TEMPLATEPATH . '/lib/includes/user.php'); ?>
<h1 <?php if (!isset($hide_date[0])) echo 'class="entry-short"'; else echo 'class="entry-wide"'; ?>><?php the_title();?></h1>
<?php if (!isset($hide_date[0])) : ?>
<?php endif;?>
<?php if (in_category(array(1,3,54,9,15,21,22,23,24,16,17,18,19,20,26,27,28,25,29,30,31))) {
?>
<div class="entry-badge pngfix"><span class="day"><a href="#kauf">Bild kaufen</a></span></div>
<div class="entry-contentgalerie">
<?php $Galeriebild = get_post_meta($post->ID, 'Galeriebild', true); ?>
<a rel="lightbox[recent]" href="<?php echo home_url( '/bilder-final/' ); ?><?php echo $Galeriebild; ?>"><img class="galeriebild" src="<?php echo home_url( '/bilder/' ); ?><?php echo $Galeriebild; ?>" /></a>
<?php the_content($r_t_readmore);?>
</div>
<?php }
else { ?>
<div class="entry-content">
<?php $Image = get_post_meta($post->ID, 'Image', true); ?>
<a rel="lightbox[recent]" href="<?php echo home_url( '/bilder/' ); ?><?php echo $Image; ?>"><img class="postpic" src="<?php echo home_url( '/bilder/' ); ?><?php echo $Image; ?>" /></a>
<?php the_content($r_t_readmore);?>
</div>
<?php } ?>
<?php if (!isset($hide_cat[0]) || !isset($hide_comments[0])) : ?>
<div class="metadata">
<div class="metadata-content">
<?php if (in_category(array(1,3,54,9,15,21,22,23,24,16,17,18,19,20,26,27,28,25,29,30,31))) {
?>
<?php include(TEMPLATEPATH . '/lib/includes/single-product.php'); ?>
<?php }
else { ?>
<?php if (!isset($hide_cat[0])) : ?>
<p><?php echo stripslashes($r_t_categories); ?>: <?php the_category(' / '); ?></p>
<?php endif; // end hide categories ?>
<?php } ?>
</div>
</div>
<div class="entry-shadow"></div>
<?php endif; // end hide comments and categories ?>
<?php if (in_category(array(1,3,54,9,15,21,22,23,24,16,17,18,19,20,26,27,28,25,29,30,31))) {
?>
<?php }
else { ?>
<?php if (!isset($hide_author[0])) : ?>
<!-- start about-autor -->
<!-- end about-autor -->
<?php endif; // end hide author ?>
<?php } ?>
</div>
<!-- end entry -->
<?php endwhile;?>
<?php else : ?>
<div class="entry">
<h2 class="entry-wide"><?php echo stripslashes($r_t_search_error_h); ?></h2>
<div class="entry-content">
<p><?php echo stripslashes($r_t_search_error); ?></p>
</div>
</div>
<?php endif;?>
</div>
<!-- end left -->
<?php if (!isset($hide_sidebar[0])) : ?>
<!-- start right -->
<div id="right">
<div id="sidebar">
<?php if ($widgets_area == '' || $widgets_area == 'default') : ?>
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar('Default')) ?>
<?php else : ?>
<?php if (!function_exists('dynamic_sidebar') || !dynamic_sidebar($widgets_area)) ?>
<?php endif; ?>
</div>
</div>
<!-- end right -->
<?php endif; // end hide sidebar ?>
<div class="clear-footer"></div>
</div>
<!-- end body-wrap -->
<?php get_footer(); ?>
Alles anzeigen
und hier die single-product.php (Auszu)
<?php if (count($custom["thumbs"]) > 1) { ?>
<div id="product-thumbs">
<?php for ($i = 0; $i <= count($custom["thumbs"])-1; $i++) { ?>
<a href="#" <?php if($i==0) echo('class="active"'); if ($i==count($custom["thumbs"])-1) echo('class="last"') ?> rel="<?php echo($i+1); ?>">
<img src="<?php bloginfo('template_directory') ?>/timthumb.php?src=<?php echo($custom["thumbs"][$i]); ?>&w=69&h=69&zc=1" alt="" />
<span class="overlay"></span>
</a>
<?php }; ?>
</div> <!-- #product-thumbs -->
<?php }; ?>
</div> <!-- #product-slider -->
<?php }; ?>
<div class="product-info">
<!--<h1 class="title"><?php the_title(); ?></h1> -->
<?php if (get_option('estore_postinfo2') <> '' && !$et_page) { ?>
<p class="post-meta"><?php _e('Added','eStore'); ?> <?php if (in_array('date', get_option('estore_postinfo2'))) { ?> <?php _e('on','eStore') ?> <?php the_time(get_option('estore_date_format')) ?><?php }; ?> <?php if (in_array('categories', get_option('estore_postinfo2'))) { ?> <?php _e('in','eStore'); ?> <?php the_category(', ') ?><?php }; ?></p>
<?php }; ?>
<div class="clearfix">
<?php if ($et_price <> '') { ?>
<span class="price-single"><span><?php echo($et_price); ?></span></span>
<a href="#" class="addto-cart"><span><?php _e('Add to cart','eStore'); ?></span></a>
<?php }; ?>
</div>
<div class="description">
<p><?php echo($et_description); ?></p>
</div> <!-- .description -->
</div> <!-- #product-info -->
<div class="clear"></div>
<div class="hr"></div>
<div class="galerieuntertitel"><?php $Galerieuntertitel = get_post_meta($post->ID, 'Galerieuntertitel', true); ?>
<?php echo $Galerieuntertitel; ?></div>
<div class="kaufen">
<h4>Dieses Bild kaufen</h4>
</div>
<div class="clear"></div>
<div id="accordion">
<img src="http://axel.agentur-mai.de/flash.png" />
<div style="width:365px;">
<?php $Galerieuntertitel = get_post_meta($post->ID, 'Galerieuntertitel', true); ?>
<?php echo $Galerieuntertitel; ?></div>
<img src="http://axel.agentur-mai.de/flash.png" />
<div>
<p><?php the_content(); ?></p></div>
</div>
<?php wp_link_pages(array('before' => '<p><strong>'.__('Pages','eStore').':</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
<?php edit_post_link(__('Edit this page','eStore')); ?>
<?php $orig_post = $post;
global $post;
$tags = wp_get_post_tags($post->ID);
if ($tags) {
$tag_ids = array();
foreach($tags as $individual_tag) $tag_ids[] = $individual_tag->term_id;
$args=array(
'tag__in' => $tag_ids,
'post__not_in' => array($post->ID),
'showposts'=>4,
'caller_get_posts'=>1
);
$my_query = new wp_query( $args );
if( $my_query->have_posts() ) { ?>
<div class="related">
<h2><?php _e('Related Products','eStore'); ?></h2>
<ul class="related-items clearfix">
<?php $i=1; while( $my_query->have_posts() ) {
$my_query->the_post(); ?>
<?php $thumb = '';
$width = 44;
$height = 44;
$classtext = '';
$titletext = get_the_title();
$thumbnail = get_thumbnail($width,$height,$classtext,$titletext,$titletext);
$thumb = $thumbnail["thumb"]; ?>
<li<?php if($i%2==0) echo(' class="second"'); ?>>
<a href="<?php the_permalink(); ?>" class="clearfix">
<?php if ($thumb <> '') print_thumbnail($thumb, $thumbnail["use_timthumb"], $titletext, $width, $height, $classtext); ?>
<span><?php the_title(); ?></span>
</a>
</li>
<?php $i++; ?>
<?php } ?>
</ul>
</div>
<?php }
}
$post = $orig_post;
wp_reset_query(); ?>
Alles anzeigen