DER WAHNSINN!!!
Marcus - es hat geklappt!! :) Ich bin grad mega Happy! Und das mit der Navigation zur jeweils nächsten Seite hat sich gleich darunter erledigt!
Ich danke dir super mega herzlich!! Super Support hier!
Um schreiben oder kommentieren zu können, benötigen Sie ein Benutzerkonto.
Sie haben schon ein Benutzerkonto? Melden Sie sich hier an.
Jetzt anmeldenHier können Sie ein neues Benutzerkonto erstellen.
Neues Benutzerkonto erstellenDER WAHNSINN!!!
Marcus - es hat geklappt!! :) Ich bin grad mega Happy! Und das mit der Navigation zur jeweils nächsten Seite hat sich gleich darunter erledigt!
Ich danke dir super mega herzlich!! Super Support hier!
@gerichoach: :D Ja das hab ich vorhin auch bemerkt! *gg* ist schon geändert - danke!
Marcus: Eigensinnig trifft es verdammt gut ^^".
Ich häng mal die 3 Editor Seiten an die mit Attachement und Gallery zu tun haben.. vielleicht hilft das ja ;D
Attachement.php
<?php/** * * attachment.php * * Attachment template. Used when viewing a single attachment. * */get_header(); ?> <?php get_sidebar('top'); ?> <?php if (have_posts()) { the_post(); get_template_part('content', 'attachment'); /* Display comments */ if (theme_get_option('theme_allow_comments')) { comments_template(); } } else { theme_404_content(); } ?> <?php get_sidebar('bottom'); ?><?php get_footer(); ?>
contentattachment.php
<?php/** * * content*.php * * The post format template. You can change the structure of your posts or add/remove post elements here. * * 'id' - post id * 'class' - post class * 'thumbnail' - post icon * 'title' - post title * 'before' - post header metadata * 'content' - post content * 'after' - post footer metadata * * To create a new custom post format template you must create a file "content-YourTemplateName.php" * Then copy the contents of the existing content.php into your file and edit it the way you want. * * Change an existing get_template_part() function as follows: * get_template_part('content', 'YourTemplateName'); * */global $post;/* Display navigation to next/previous pages when applicable */if (!empty($post->post_parent)) { $return_link = '<a href="' . get_permalink($post->post_parent) . '" title="' . esc_attr(sprintf(__('Return to %s', THEME_NS), strip_tags(get_the_title($post->post_parent)))) . '" rel="gallery">' . sprintf(__('<span class="meta-nav">←</span> %s', THEME_NS), get_the_title($post->post_parent)) . '</a>'; theme_post_navigation(array('next_link' => $return_link));}
theme_ob_start();
if (wp_attachment_is_image()) { $attachments = array_values(get_children(array('post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID'))); foreach ($attachments as $k => $attachment) { if ($attachment->ID == $post->ID) break; } $k++; $next_attachment_url = ''; // If there is more than 1 image attachment in a gallery if (count($attachments) > 1) { if (isset($attachments[$k])) // get the URL of the next image attachment $next_attachment_url = get_attachment_link($attachments[$k]->ID); else // or get the URL of the first image attachment $next_attachment_url = get_attachment_link($attachments[0]->ID); } else { // or, if there's only 1 image attachment, get the URL of the image $next_attachment_url = wp_get_attachment_url(); } ?> <p class="attachment center"> <a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr(strip_tags(get_the_title())); ?>" rel="attachment"> <?php $attachment_size = apply_filters('attachment_size', 600); echo wp_get_attachment_image($post->ID, array($attachment_size, 9999)); // filterable image width with, essentially, no limit for image height. ?> </a> </p> <?php} else { ?> <p class="attachment center"> <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr(strip_tags(get_the_title())); ?>" rel="attachment"> <?php echo basename(get_permalink()); ?> </a> </p> <?php}
echo theme_get_content();
if (wp_attachment_is_image()) { $metadata = wp_get_attachment_metadata(); echo '<p class="center">' . sprintf( __( 'Full size is %s pixels', THEME_NS), sprintf( '<a href="%1$s" title="%2$s">%3$s × %4$s</a>', wp_get_attachment_url(), esc_attr( __('Link to full-size image', THEME_NS) ), $metadata['width'], $metadata['height'] ) ) . '</p>';}
/* Display navigation to next/previous pages when applicable */theme_post_navigation(array('wrap' => false, 'prev_link' => theme_get_next_image_link(false), 'next_link' => theme_get_previous_image_link(false)));
theme_post_wrapper( array( 'id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>', 'heading' => theme_get_option('theme_' . (is_home() ? 'posts' : 'single') . '_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_ob_get_clean(), ));?>
content-Gallery.php
<?php/** * * content*.php * * The post format template. You can change the structure of your posts or add/remove post elements here. * * 'id' - post id * 'class' - post class * 'thumbnail' - post icon * 'title' - post title * 'before' - post header metadata * 'content' - post content * 'after' - post footer metadata * * To create a new custom post format template you must create a file "content-YourTemplateName.php" * Then copy the contents of the existing content.php into your file and edit it the way you want. * * Change an existing get_template_part() function as follows: * get_template_part('content', 'YourTemplateName'); * */global $post;theme_ob_start();$images = get_children(array('post_parent' => $post->ID, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order', 'order' => 'ASC', 'numberposts' => 999));if ($images) { $total_images = count($images); $image = array_shift($images); $image_img_tag = wp_get_attachment_image($image->ID, 'thumbnail'); ?> <div class="gallery-thumb"> <a class="size-thumbnail" href="<?php the_permalink(); ?>"><?php echo $image_img_tag; ?></a> </div><!-- .gallery-thumb --> <p><em><?php printf( _n( 'This gallery contains <a %1$s>%2$s photo</a>.', 'This gallery contains <a %1$s>%2$s photos</a>.', $total_images, THEME_NS ), 'href="' . get_permalink() . '" title="' . sprintf( esc_attr__( 'Permalink to %s', THEME_NS ), strip_tags(the_title_attribute( 'echo=0' )) ) . '" rel="bookmark"', number_format_i18n( $total_images ) ); ?></em> </p> <?php } echo theme_get_excerpt(); theme_post_wrapper( array( 'id' => theme_get_post_id(), 'class' => theme_get_post_class(), 'title' => '<a href="' . get_permalink($post->ID) . '" rel="bookmark" title="' . strip_tags(get_the_title()) . '">' . get_the_title() . '</a>', 'heading' => theme_get_option('theme_' . (is_home() ? 'posts' : 'single') . '_article_title_tag'), 'before' => theme_get_metadata_icons('date,author,edit', 'header'), 'content' => theme_ob_get_clean(), 'after' => theme_get_metadata_icons('category,tag,comments', 'footer') ) );
Soviel Code T_T
Tut mir leid! ich hoffe jemand findet was - wenn NICHT! nicht schlimm -macht euch bitte keine zu große Arbeit!
Liebe Grüße
Hallo Marcus,
ja das hab ich schon gefunden. Leider kann ich es eben wie gesagt nur auf die Anhang - Seite (wo dann dieser Größe-Angabe Satz erscheint) oder zum Bild selbst verlinken (was uns ja nichts bringt, da wir das Tier ja auf der Anhang seite vorstellen :)).
wer sich das mal ansehen will kann ja mal unter http://www.tierheim-lichtenfels.de schauen!
Danke für deine Antwort :)
Hallo ihr Lieben,
ich arbeite ehrenamtlich für unser örtliches Tierheim und habe für unsere Homepage Wordpress benutzt.
Nun zu meiner Frage:
Die Gallerien unserer Tiere habe ich mittels der Standart-Gallerien eingefügt.
Leider mogelt sich unter den Bilden, sobald man sie anklickt, der hässliche Satz "Die gesamte Größe beträgt
960 × 720Pixel" und eine Navigation zu den nächsten Bildern ein.
Habt ihr eine Lösung wie ich das entfernen kann?
Anbei hab ich euch ein bild gehängt wie die ganze Sache aussieht!
Achja das Design ist "selbst" erstellt mit Artisteer (ja ich weiss - schreckliche Programmiersache - aber so ist es leichter für uns :) ).
Danke im Vorraus!
Liebe Grüße!