Hallo,
ich würde gerne auf der Startseite nur eine Gallerie/Portfolio ID anzeigen und nicht wie jetzt alle.
Ich würde gerne nur die Post ID 79 anzeigen lassen .
Über Hilfe würde ich mich sehr freuen :-)
[COLOR=#ff0000][website auf Userwunsch per Email gelöscht, 3. 11. 2015 Monika, wieder mal ein Link wegen ziemlcih sicher wegen "SEO" gelöscht, artet in verdammt viel Arbeit aus][/COLOR]
PHP
<?php
get_header();
?>
<div id="portfolio_loader"></div>
<div id="portfolio">
<div id="portfolio_image">
<?php
query_posts("post_type=portfolio&posts_per_page=1");
if (have_posts()) : while (have_posts()) : the_post();
$attachments = get_children(array('post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'DESC',
'orderby' => 'menu_order ID'));
foreach ($attachments as $att_id => $attachment) :
$image_src = wp_get_attachment_image_src($attachment->ID, "portfolio_image");
$image_portrait_src = wp_get_attachment_image_src($attachment->ID, "portfolio_portrait_image");
$image_full_src = wp_get_attachment_image_src($attachment->ID, "full");
$slide_type = get_post_meta($attachment->ID, 'fw_item_type', true);
switch ($slide_type) :
case "" :
if (get_post_meta($attachment->ID, 'fw_orientation_type', true) == "landscape" || get_post_meta($attachment->ID, 'fw_orientation_type', true) == "") :
?>
<div><a title="<?php echo $attachment->post_title ?>" href="<?php echo $image_full_src[0] ?>" rel="prettyPhoto[pp_gal]"><img src="<?php echo $image_src[0] ?>" alt="" /></a></div>
<?php
else:
?>
<div class="portfolio_portrait"><a title="<?php echo $attachment->post_title ?>" href="<?php echo $image_full_src[0] ?>" rel="prettyPhoto[pp_gal]"><img src="<?php echo $image_portrait_src[0] ?>" alt="" /></a></div>
<?php
endif;
break;
case "normal" :
if (get_post_meta($attachment->ID, 'fw_orientation_type', true) == "landscape" || get_post_meta($attachment->ID, 'fw_orientation_type', true) == "") :
?>
<div><a title="<?php echo $attachment->post_title ?>" href="<?php echo $image_full_src[0] ?>" rel="prettyPhoto[pp_gal]"><img src="<?php echo $image_src[0] ?>" alt="" /></a></div>
<?php
else:
?>
<div class="portfolio_portrait"><a title="<?php echo $attachment->post_title ?>" href="<?php echo $image_full_src[0] ?>" rel="prettyPhoto[pp_gal]"><img src="<?php echo $image_portrait_src[0] ?>" alt="" /></a></div>
<?php
endif;
break
endswitch;
?>
<?php
endforeach;
endwhile; endif;
?>
</div>
<ul>
<?php
$slide_count = 1;
if (have_posts()) : while (have_posts()) : the_post();
$attachments = get_children(array('post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'DESC',
'orderby' => 'menu_order ID'));
foreach ($attachments as $att_id => $attachment) :
$slide_type = get_post_meta($attachment->ID, 'fw_item_type', true);
$image_src = wp_get_attachment_image_src($attachment->ID, "portfolio_thumb");
?>
<li>
<a href="#" data-slide-type="<?php echo $slide_type ?>" data-slide="<?php echo $slide_count ?>">
<img src="<?php echo $image_src[0] ?>" alt="" />
<span class="selected"></span>
</a>
</li>
<?php
$slide_count++;
endforeach;
endwhile; endif;
?>
</ul>
</div>
</div>
<div id="portfolio_controls">
<ul>
<li class="left_arrow"><a href="#"></a></li>
<li class="play_stop"><a href="#"></a></li>
<li class="right_arrow"><a href="#"></a></li>
</ul>
</div>
<!-- END #portfolio_controls -->
<!-- START #portfolio_info -->
<div id="portfolio_info">
<p>00/00</p>
</div>
<!-- END #portfolio_info -->
<?php
query_posts("post_type=portfolio&posts_per_page=99999");
if ($wp_query->post_count > 1) :
?>
<!-- START #portfolio_categories -->
<div id="portfolio_categories">
<a href="#" id="portfolio_toggle_button"><?php _e("Categories", "cluster") ?></a>
<!-- START #portfolio_categories_popup -->
<div id="portfolio_categories_popup">
<?php if (have_posts()) : while (have_posts()) : the_post() ?>
<a href="<?php the_permalink() ?>" class="category_list_item">
<div class="category_list_item_image">
<?php the_post_thumbnail("categories_thumb") ?>
</div>
<div class="category_list_item_info">
<?php the_title() ?>
<?php
$gallery_item_count = 0;
$attachments = get_children(array('post_parent' => $post->ID,
'post_status' => 'inherit',
'post_type' => 'attachment',
'post_mime_type' => 'image',
'order' => 'ASC',
'orderby' => 'menu_order ID'));
foreach ($attachments as $att_id => $attachment) :
$gallery_item_count++;
endforeach;
?>
<span><?php echo $gallery_item_count." "; _e("Photos", "cluster"); ?></span>
</div>
</a>
<?php endwhile; endif; ?>
</div>
<!-- END #portfolio_categories_popup -->
</div>
<!-- END #portfolio_categories -->
<?php endif ?>
<div class="clear"></div>
</div>
<!-- END #portfolio_navigation -->
</div>
<!-- END #portfolio -->
<script>
jQuery(window).load(function ()
{
jQuery("a[rel^='prettyPhoto']").prettyPhoto();
});
</script>
<?php get_footer() ?>
Alles anzeigen