Wer das Problem auch hat, findet hier die Lösung.
Beiträge von cth_meisterlampe
-
-
Work is done...
Es funktioniert! Template auf Showcase und die showcase.php um folgenden Teil gekürzt:
PHP
Alles anzeigen<section class="recent-posts"> <h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1> <?php // Display our recent posts, showing full [URL="http://forum.wpde.org/lexikon/?do=showentry&item=content"][COLOR=#000000]content[/COLOR][/URL] for the very latest, ignoring Aside posts. $recent_args = array( 'order' => 'DESC', 'post__not_in' => get_option( 'sticky_posts' ), 'tax_query' => array( array( 'taxonomy' => 'post_format', 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ), 'field' => 'slug', 'operator' => 'NOT IN', ), ), 'no_found_rows' => true, ); // Our new query for the Recent Posts section. $recent = new WP_Query( $recent_args ); // The first Recent post is displayed normally if ( $recent->have_posts() ) : $recent->the_post(); // Set $more to 0 in order to only get the first part of the post. global $more; $more = 0; get_template_part( 'content', get_post_format() ); echo '<ol class="other-recent-posts">'; endif; // For all other recent posts, just display the title and comment status. while ( $recent->have_posts() ) : $recent->the_post(); ?> <li class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a> <span class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?> </span> </li> <?php endwhile; // If we had some posts, close the <ol> if ( $recent->post_count > 0 ) echo '</ol>'; ?> </section><!-- .recent-posts --> -
Ich kann wählen, zwischen:
Standardtemplate
Showcase Template
Sidebar Template
Wobei "Standardtemplate" ohne Sidebar ist, "Showcase" ist auch ohne Sidebar und nutzt die volle Breite. "Sidebar Template" ist das einzige welches die Sidebar anzeigt.
Daher würde ich gerne "Showcase" verwenden, weil ich es nirgens sonst auf der Homepage verwende. Man könnte also für das Forum konfigurieren, wie man es braucht. ...wenn man es kann... :roll: -
Hallo infected,
ich versuche das Plugin "WP Forum Server" dazu zu überreden, die volle Breite der Seite zu nutzen.
Ich nutze das Theme "Twenty_Eleven" auf einer Wordpress installation v3.3.1.
Ich habe bereits versucht das Problem mit einer zweiten "Page.php" und einer änderung in der "Style.css" zu beheben, aber ich habe zu wenig Kenntnis von der Materie...
Ich nutze auf der Seite des Forums keine Sidebar und somit wäre noch viel Platz, aber den nutzt das Forum nur, wenn ich das Tamplate der Seite auf "showcase" umstelle. Dann werden aber wiederum, unterhalb des Forum, die Arktikel die im Wordpress geposted wurden angezeigt und das möchte ich nicht...
Der Link zur Seite wäre nutzlos, da das Forum nur für Vereinsmitglieder zugänglich ist.
Hoffe Du kannst damit was anfangen, bräuchte da wirklich dringend etwas Hilfe. -
Hallo zusammen,
kann mir jemand den folgenden Code so anpassen, dass nur noch der Inhalt der angezeigt wird, den ich fix in die Seite geschrieben habe, aber nicht mehr die veröffentlichten Artikel? Das wäre super genial, ich bin damit leider hoffnungslos Überfordert...
PHP
Alles anzeigen<?php /** * Template Name: Showcase Template * Description: A Page Template that showcases Sticky Posts, Asides, and Blog Posts * * The showcase template in Twenty Eleven consists of a featured posts section using sticky posts, * another recent posts area (with the latest post shown in full and the rest as a list) * and a left sidebar holding aside posts. * * We are creating two queries to fetch the proper posts and a custom widget for the sidebar. * * @package WordPress * @subpackage Twenty_Eleven * @since Twenty Eleven 1.0 */ // Enqueue showcase script for the slider wp_enqueue_script( 'twentyeleven-showcase', get_template_directory_uri() . '/js/showcase.js', array( 'jquery' ), '2011-04-28' ); get_header(); ?> <div id="primary" class="showcase"> <div id="content" role="main"> <?php while ( have_posts() ) : the_post(); ?> <?php /** * We are using a heading by rendering the_content * If we have content for this page, let's display it. */ if ( '' != get_the_content() ) get_template_part( 'content', 'intro' ); ?> <?php endwhile; ?> <?php /** * Begin the featured posts section. * * See if we have any sticky posts and use them to create our featured posts. * We limit the featured posts at ten. */ $sticky = get_option( 'sticky_posts' ); // Proceed only if sticky posts exist. if ( ! empty( $sticky ) ) : $featured_args = array( 'post__in' => $sticky, 'post_status' => 'publish', 'posts_per_page' => 10, 'no_found_rows' => true, ); // The Featured Posts query. $featured = new WP_Query( $featured_args ); // Proceed only if published posts exist if ( $featured->have_posts() ) : /** * We will need to count featured posts starting from zero * to create the slider navigation. */ $counter_slider = 0; ?> <div class="featured-posts"> <h1 class="showcase-heading"><?php _e( 'Featured Post', 'twentyeleven' ); ?></h1> <?php // Let's roll. while ( $featured->have_posts() ) : $featured->the_post(); // Increase the counter. $counter_slider++; /** * We're going to add a class to our featured post for featured images * by default it'll have the feature-text class. */ $feature_class = 'feature-text'; if ( has_post_thumbnail() ) { // ... but if it has a featured image let's add some class $feature_class = 'feature-image small'; // Hang on. Let's check this here image out. $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), array( HEADER_IMAGE_WIDTH, HEADER_IMAGE_WIDTH ) ); // Is it bigger than or equal to our header? if ( $image[1] >= HEADER_IMAGE_WIDTH ) { // If bigger, let's add a BIGGER class. It's EXTRA classy now. $feature_class = 'feature-image large'; } } ?> <section class="featured-post <?php echo $feature_class; ?>" id="featured-post-<?php echo $counter_slider; ?>"> <?php /** * If the thumbnail is as big as the header image * make it a large featured post, otherwise render it small */ if ( has_post_thumbnail() ) { if ( $image[1] >= HEADER_IMAGE_WIDTH ) $thumbnail_size = 'large-feature'; else $thumbnail_size = 'small-feature'; ?> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_post_thumbnail( $thumbnail_size ); ?></a> <?php } ?> <?php get_template_part( 'content', 'featured' ); ?> </section> <?php endwhile; ?> <?php // Show slider only if we have more than one featured post. if ( $featured->post_count > 1 ) : ?> <nav class="feature-slider"> <ul> <?php // Reset the counter so that we end up with matching elements $counter_slider = 0; // Begin from zero rewind_posts(); // Let's roll again. while ( $featured->have_posts() ) : $featured->the_post(); $counter_slider++; if ( 1 == $counter_slider ) $class = 'class="active"'; else $class = ''; ?> <li><a href="#featured-post-<?php echo $counter_slider; ?>" title="<?php printf( esc_attr__( 'Featuring: %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" <?php echo $class; ?>></a></li> <?php endwhile; ?> </ul> </nav> <?php endif; // End check for more than one sticky post. ?> </div><!-- .featured-posts --> <?php endif; // End check for published posts. ?> <?php endif; // End check for sticky posts. ?> <section class="recent-posts"> <h1 class="showcase-heading"><?php _e( 'Recent Posts', 'twentyeleven' ); ?></h1> <?php // Display our recent posts, showing full content for the very latest, ignoring Aside posts. $recent_args = array( 'order' => 'DESC', 'post__not_in' => get_option( 'sticky_posts' ), 'tax_query' => array( array( 'taxonomy' => 'post_format', 'terms' => array( 'post-format-aside', 'post-format-link', 'post-format-quote', 'post-format-status' ), 'field' => 'slug', 'operator' => 'NOT IN', ), ), 'no_found_rows' => true, ); // Our new query for the Recent Posts section. $recent = new WP_Query( $recent_args ); // The first Recent post is displayed normally if ( $recent->have_posts() ) : $recent->the_post(); // Set $more to 0 in order to only get the first part of the post. global $more; $more = 0; get_template_part( 'content', get_post_format() ); echo '<ol class="other-recent-posts">'; endif; // For all other recent posts, just display the title and comment status. while ( $recent->have_posts() ) : $recent->the_post(); ?> <li class="entry-title"> <a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a> <span class="comments-link"> <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a reply', 'twentyeleven' ) . '</span>', __( '<b>1</b> Reply', 'twentyeleven' ), __( '<b>%</b> Replies', 'twentyeleven' ) ); ?> </span> </li> <?php endwhile; // If we had some posts, close the <ol> if ( $recent->post_count > 0 ) echo '</ol>'; ?> </section><!-- .recent-posts --> <div class="widget-area" role="complementary"> <?php if ( ! dynamic_sidebar( 'sidebar-2' ) ) : ?> <?php the_widget( 'Twenty_Eleven_Ephemera_Widget', '', array( 'before_title' => '<h3 class="widget-title">', 'after_title' => '</h3>' ) ); ?> <?php endif; // end sidebar widget area ?> </div><!-- .widget-area --> </div><!-- #content --> </div><!-- #primary --> <?php get_footer(); ?> -
Hallo zusammen,
ich nutze das Standart Theme "Twenty Eleven 1.3" auf einer WP installation v3.3.1.
Hier habe ich das Plugin "WP Forum Server" installiert, was auch an sich gut funktioniert. Leider nutzt es nicht die Breite der Seite aus. Ich habe es in seiner eigenen Seite am laufen und dort wird auch kein seitliches Menü angezeigt. Es wäre also die vollen 1000px verfügbar. Nutzten tut das Forum aber nur geschäzte 50%...
Weiss jemand an welcher Schraube ich drehen muss, damit ich sagen wir 90% der Seitenbeite ausnutzen kann?
Danke für eure Hilfe!