Hallo,
das ist alles in dem Theme Gemer 1.0.2 von [COLOR=#21759b]Dannci[/COLOR] enthalten.
Beiträge von koffer
-
-
Wald und Bäume... ;-)
Danke, das wars!! Jetzt passt alles, ich hab einfach die Schrift minimal verkleinert. Muss man halt nur drauf kommen.
Nochmal danke für deine Hilfe!
MfG,
koffer -
Hallo nochmal,
ich blicke nicht mehr durch :???:
Ich habe jetzt ein wenig rumprobiert in den Überschriften. Lasse ich z.B. bei "C – Jugend: Mannschaftsabend in Pizzeria Roma" ein "n" bei "Mannschaftsabend" weg, schreibe also "Manschaftsabend", ist alles ok.
Das gleiche: Aus "C – Jugend mit neuer Trainingskleidung" wird "C – Jugend mit neuer Traiingskleidung" oder aus "Tocus: Von Spendensammlung überwältigt" wird Tocus: "Von Spendensamlung überwältigt".
Bei diesen Änderungen wird alles korrekt angezeigt, die Überschrift bei den letzten Artikel ist vollständig. Wo könnte man da ansetzen?
Vielen Dank,
mfG,
Koffer -
Hallo, ich habe ein kleines Problem...
Auf der Seite http://www.vsv-wenden.de/jugendabteilung/ werden ganz oben die letzten Artikel eingeblendet.
Bei einigen ist die Überschrift allerdings abgeschnitten, z.B. steht da "C-Jugend:" und der Rest ist weg.
Unterhalb im Artikel ist alles korrekt ("C-Jugend: Mannschaftsabend in Pizzeria Roma"). Der Fehler taucht nicht bei allen Artikel auf, sondern scheinbar nur bei Sonntags geschriebenen :???: . Auf der Seite sieht man ganz gut was ich meine.
Habt ihr eine Idee, woran das liegen könnte? Bin mal wieder überfordert...
Vielen Dank schonmal für Eure Mühe,
mfG,
koffer -
Wahrscheinlich wirklich Zufall. Vorhin lief es flüssiger. Ich beobachte das mal. Ich danke!
-
Hallo nochmal, eine Sache noch: Irgendwie baut die Seite jetzt langsamer auf habe ich das Gefühl. Die rechte Seite mit der Sidebar besonders:
http://www.vsv-wenden.de/jugendabteilung/
Kann das evtl. mit der Änderung zusamenhängen?
Vielen Dank,
mfG,
koffer -
Perfekt, funktioniert auf Anhieb genau so, wie es soll!
Vielen vielen Dank für die Arbeit und schnelle Hilfe!!!
MfG,
koffer -
danke schonmal für deine hilfe!
left:
PHP
Alles anzeigen<div id="left"> <ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?> <?php wp_list_categories('title_li=<h2>Categories</h2>'); ?> <li><h2>Archives</h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <?php wp_list_bookmarks(); ?> <?php endif; ?> </ul> </div>
right:
HTML
Alles anzeigen<div id="right"> <ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(2) ) : ?> <?php wp_list_pages('title_li=<h2>Pages</h2>' ); ?> <li><h2>Meta</h2> <ul> <?php wp_register(); ?> <li><?php wp_loginout(); ?></li> <li><a href="http://validator.w3.org/check/referer" title="This page validates as XHTML 1.0 Transitional">Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr></a></li> <li><a href="http://gmpg.org/xfn/"><abbr title="XHTML Friends Network">XFN</abbr></a></li> <li><a href="http://wordpress.org/" title="Powered by WordPress, state-of-the-art semantic personal publishing platform.">WordPress</a></li> <?php wp_meta(); ?> </ul> </li> <?php endif; ?> </ul> </div>
mfg,
koffer -
Hallo,
ich möchte gerne meine sidebar.php anpassen. Zur Zeit sind oben "fest eingestellt" die most popular Posts. Damit habe ich ein Problemchen, welches ich nicht lösen kann, daher können die weg.
An dieser Stelle möchte ich in dieser Breite gerne ein Widget einfügen, zerschieße mir aber immer wieder alles.
Meine functions.php sieht so aus:
PHP
Alles anzeigen<?php include("settings.php"); # WIDGET: Sidebar # WIDGET: Left Sidebar if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Left Sidebar', 'before_title' => '<h2>', 'after_title' => '</h2>', 'before_widget' => '', 'after_widget' => '', )); # WIDGET: Right Sidebar if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Right Sidebar', 'before_title' => '<h2>', 'after_title' => '</h2>', 'before_widget' => '', 'after_widget' => '', )); # Displays a list of pages function dp_list_pages() { global $wpdb; $querystr = "SELECT $wpdb->posts.ID, $wpdb->posts.post_title FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'page' ORDER BY $wpdb->posts.post_title ASC"; $pageposts = $wpdb->get_results($querystr, OBJECT); if ($pageposts) { foreach ($pageposts as $post) { ?><li><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a></li><?php } } } # Displays a list of categories function dp_list_categories($num=0, $exclude='') { if (strlen($exclude)>0) $exclude = '&exclude=' . $exclude; $categories = get_categories('hide_empty=1'.$exclude); $first = true; $count = 0; foreach ($categories as $category) { if ($num>0) { $count++; if ($count>$num) break; } // limit if ($category->parent<1) { if ($first) { $first = false; $f = ' class="f"'; } else { $f = ''; } ?><li<?php echo $f; ?>> <a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->name ?><?php echo $raquo; ?></a></li> <?php } } } # Displays a list of popular posts function dp_popular_posts($num, $pre='<li>', $suf='</li>', $excerpt=true) { global $wpdb; $querystr = "SELECT $wpdb->posts.post_title, $wpdb->posts.ID, $wpdb->posts.post_content FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'post' ORDER BY $wpdb->posts.comment_count DESC LIMIT $num"; $myposts = $wpdb->get_results($querystr, OBJECT); foreach($myposts as $post) { echo $pre; ?><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title ?></a><?php if ($excerpt) { ?><p><?php echo dp_clean($post->post_content, 120); ?>...</p><?php } echo $suf; } } # Displays a list of recent categories function dp_recent_comments($num, $pre='<li>', $suf='</li>') { global $wpdb, $post; $querystr = "SELECT $wpdb->comments.comment_ID, $wpdb->comments.comment_post_ID, $wpdb->comments.comment_author, $wpdb->comments.comment_content, $wpdb->comments.comment_author_email FROM $wpdb->comments WHERE $wpdb->comments.comment_approved=1 ORDER BY $wpdb->comments.comment_date DESC LIMIT $num"; $recentcomments = $wpdb->get_results($querystr, OBJECT); foreach ($recentcomments as $rc) { $post = get_post($rc->comment_post_ID); echo $pre; ?><strong><a href="<?php the_permalink() ?>#comment-<?php echo $rc->comment_ID ?>"><?php echo $rc->comment_author ?></a></strong> on <a href="<?php the_permalink() ?>#comment-<?php echo $rc->comment_ID ?>"><?php echo $post->post_title; ?></a><?php echo $suf; } } # Displays post image attachment (sizes: thumbnail, medium, full) function dp_attachment_image($postid=0, $size='thumbnail', $attributes='') { if ($postid<1) $postid = get_the_ID(); if ($images = get_children(array( 'post_parent' => $postid, 'post_type' => 'attachment', 'numberposts' => 1, 'post_mime_type' => 'image',))) foreach($images as $image) { $attachment=wp_get_attachment_image_src($image->ID, $size); ?><img src="<?php echo $attachment[0]; ?>" <?php echo $attributes; ?> /><?php } } # Removes tags and trailing dots from excerpt function dp_clean($excerpt, $substr=0) { $string = strip_tags(str_replace('[...]', '...', $excerpt)); if ($substr>0) { $string = substr($string, 0, $substr); } return $string; } # Displays the comment authors gravatar if available function dp_gravatar($size=50, $attributes='', $author_email='') { global $comment, $settings; if (dp_settings('gravatar')=='enabled') { if (empty($author_email)) { ob_start(); comment_author_email(); $author_email = ob_get_clean(); } $gravatar_url = 'http://www.gravatar.com/avatar/' . md5(strtolower($author_email)) . '?s=' . $size . '&d=' . dp_settings('gravatar_fallback'); ?><img src="<?php echo $gravatar_url; ?>" <?php echo $attributes ?>/><?php } } # Retrieves the setting's value depending on 'key'. function dp_settings($key) { global $settings; return $settings[$key]; } ?>
Meine sidebar.php so:
PHP
Alles anzeigen<!-- BEGIN sidebar --> <div id="sidebar"> <!-- begin popular posts --> <div class="box"> Wieder mal leichte Überforderung, alles "probieren" hilft nichts. Vielleicht hat ja jemand eine Lösung. Vielen Dank schonmal, mfG, koffer <h2>Meist gelesene Artikel</h2> <ul class="popular"> <?php dp_popular_posts(3); ?> </ul> </div> <!-- end popular posts --> <!-- BEGIN half sidebars --> <?php include(TEMPLATEPATH."/left.php");?> <?php include(TEMPLATEPATH."/right.php");?> <!-- END half sidebars --> </div> <!-- END sidebar -->
Vielleicht hat jemand eine Idee, ich bin wieder Mal leicht überfordert...
Vielen Dank schonmal,
mfG,
koffer -
Hallo,
bei mir werden die meist gelesenen Artikel angezeigt. Hier der Code aus der functions.php:
PHP
Alles anzeigen# Displays a list of popular posts function dp_popular_posts($num, $pre='<li>', $suf='</li>', $excerpt=true) { global $wpdb; $querystr = "SELECT $wpdb->posts.post_title, $wpdb->posts.ID, $wpdb->posts.post_content FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'post' ORDER BY $wpdb->posts.comment_count DESC LIMIT $num"; $myposts = $wpdb->get_results($querystr, OBJECT); foreach($myposts as $post) { echo $pre; ?><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title ?></a><?php if ($excerpt) { ?><p><?php echo dp_clean($post->post_content, 120); ?>...</p><?php } echo $suf; } }in der sidebar.php dann dieses:
HTML<!-- begin popular posts --> <div class="box"> <h2>Meist gelesene Artikel</h2> <ul class="popular"> <?php dp_popular_posts(3); ?> </ul> </div> <!-- end popular posts -->Besteht die Möglichkeit, nur Artikel aus einem bestimmten Zeitraum, also der letzten X Tage oder Wochen anzeigen zu lassen? Sonst tauchen nämlich schonmal uralte Artikel ganz oben auf.
Vielleicht hat jemand ja eine Idee.
Vielen Dank schonmal,
mfG,
koffer -
Perfekt!!! :-D
Jetzt funktioniert alles, vielen Dank für deine Mühe!
MfG,
koffer -
Ok, ich hab das Theme jetzt mal aktiviert. Du siehst auf der ersten Seite schon, was ich meine:
http://www.vsv-wenden.de/jugendabteilung/ -
Vielen Dank!!! Man muss halt nur Ahnung haben :wink:
Jetzt noch ein kleines Problem... Thumbnail wird eingefügt, unmittelbar daneben aber auch ein defektes Thumbnail :confused: Sowohl bei den vorhandenen, als auch wenn ich einen neuen Artikel schreibe.
Noch einen Tip?
Nochmal Vielen Dank,
mfG,
koffer -
Hallo,
ich lese jetzt schon seit Tagen iim Forum, finde aber keine Lösung.
Ich habe das Theme "Gemer 1.0.2" http://wordpress.org/extend/themes/gemer
und WP 2.8.6 (ich weiß, aber momentan ist leider nichts anderes möglich...)
Auf der Startseite werden "Featured News" mit Textausschnitten und Thumbnails angezeigt. Nur leider werden die Thumbnails nicht angezeigt.
Z.B. im Archiv hingegen ist alles ok, hier werden die Thumbnails dargestellt.
Das ist die index.php:
PHP
Alles anzeigen<?php get_header(); ?> <!-- BEGIN content --> <div id="content"> <!-- begin featured news --> <div class="featured"> <h2>Featured News</h2> <div id="featured"> <?php $tmp_query = $wp_query; query_posts('showposts=3&cat=' . get_cat_ID(dp_settings('featured'))); if (have_posts()) : while (have_posts()) : the_post(); ?> <!-- begin post --> <div class="fpost"> <a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <p class="details"></p> <p><?php echo dp_clean($post->post_content, 300); ?></p> </div> <!-- end post --> <?php endwhile; endif; ?> </div> </div> <!-- end featured news --> <?php $wp_query = $tmp_query; if (have_posts()) : $odd = false; while (have_posts()) : the_post(); $odd = !$odd; ?> <!-- begin post --> <div class="<?php if ($odd) echo 'uneven '; ?>post"> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <a href="<?php the_permalink(); ?>"></a> <?php $screen = get_post_meta($post->ID,'screen', true); ?> <img src="<?php echo ($screen); ?>" width="181" height="100" alt="" /> <p><?php echo dp_clean($post->post_content, 150); ?></p> <div class="postmeta"> <p class="category"><?php the_category(', '); ?></p> </div> </div> <!-- end post --> <?php endwhile; ?> <div class="postnav"> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Ältere Einträge') ?></div> <div class="alignright"><?php previous_posts_link('Neuere Einträge »') ?></div> </div> </div> <?php else : ?> <div class="notfound"> <h2>Not Found</h2> <p>Sorry, but you are looking for something that is not here.</p> </div> <?php endif; ?> </div> <!-- END content --> <?php get_sidebar(); get_footer(); ?>
So sieht die archive.php aus:
PHP
Alles anzeigen<?php get_header(); ?> <!-- BEGIN content --> <div id="content"> <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?> <?php /* If this is a category archive */ if (is_category()) { ?> <h2 class="title">Archive for the <strong><?php single_cat_title(); ?></strong> Category</h2> <?php /* If this is a tag archive */ } elseif( is_tag() ) { ?> <h2 class="title">Posts Tagged <strong><?php single_tag_title(); ?></strong></h2> <?php /* If this is a daily archive */ } elseif (is_day()) { ?> <h2 class="title">Archive for <?php the_time('F jS, Y'); ?></h2> <?php /* If this is a monthly archive */ } elseif (is_month()) { ?> <h2 class="title">Archive for <?php the_time('F, Y'); ?></h2> <?php /* If this is a yearly archive */ } elseif (is_year()) { ?> <h2 class="title">Archive for <?php the_time('Y'); ?></h2> <?php /* If this is an author archive */ } elseif (is_author()) { ?> <h2 class="title">Author Archive</h2> <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <h2 class="title">Blog Archives</h2> <?php } ?> <?php if (have_posts()) : $odd = false; while (have_posts()) : the_post(); $odd = !$odd; ?> <!-- begin post --> <div class="<?php if ($odd) echo 'uneven '; ?>post"> <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3> <a href="<?php the_permalink(); ?>"><?php dp_attachment_image($post->ID, 'thumbnail', 'alt="' . $post->post_title . '"'); ?></a> <p><?php echo dp_clean($post->post_content, 150); ?></p> <p class="category"><?php the_category(', '); ?></p> <p class="comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></p> </div> <!-- end post --> <?php endwhile; ?> <div class="postnav"> <?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?> </div> <?php else : ?> <div class="notfound"> <h2>Not Found</h2> <p>Sorry, but you are looking for something that is not here.</p> </div> <?php endif; ?> </div> <!-- END content --> <?php get_sidebar(); get_footer(); ?>
und so die functions.php:
PHP
Alles anzeigen<?php include("settings.php"); # WIDGET: Sidebar # WIDGET: Left Sidebar if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Left Sidebar', 'before_title' => '<h2>', 'after_title' => '</h2>', 'before_widget' => '', 'after_widget' => '', )); # WIDGET: Right Sidebar if ( function_exists('register_sidebar') ) register_sidebar(array( 'name' => 'Right Sidebar', 'before_title' => '<h2>', 'after_title' => '</h2>', 'before_widget' => '', 'after_widget' => '', )); # Displays a list of pages function dp_list_pages() { global $wpdb; $querystr = "SELECT $wpdb->posts.ID, $wpdb->posts.post_title FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'page' ORDER BY $wpdb->posts.post_title ASC"; $pageposts = $wpdb->get_results($querystr, OBJECT); if ($pageposts) { foreach ($pageposts as $post) { ?><li><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title; ?></a></li><?php } } } # Displays a list of categories function dp_list_categories($num=0, $exclude='') { if (strlen($exclude)>0) $exclude = '&exclude=' . $exclude; $categories = get_categories('hide_empty=1'.$exclude); $first = true; $count = 0; foreach ($categories as $category) { if ($num>0) { $count++; if ($count>$num) break; } // limit if ($category->parent<1) { if ($first) { $first = false; $f = ' class="f"'; } else { $f = ''; } ?><li<?php echo $f; ?>> <a href="<?php echo get_category_link($category->cat_ID); ?>"><?php echo $category->name ?><?php echo $raquo; ?></a></li> <?php } } } # Displays a list of popular posts function dp_popular_posts($num, $pre='<li>', $suf='</li>', $excerpt=true) { global $wpdb; $querystr = "SELECT $wpdb->posts.post_title, $wpdb->posts.ID, $wpdb->posts.post_content FROM $wpdb->posts WHERE $wpdb->posts.post_status = 'publish' AND $wpdb->posts.post_type = 'post' ORDER BY $wpdb->posts.comment_count DESC LIMIT $num"; $myposts = $wpdb->get_results($querystr, OBJECT); foreach($myposts as $post) { echo $pre; ?><a href="<?php echo get_permalink($post->ID); ?>"><?php echo $post->post_title ?></a><?php if ($excerpt) { ?><p><?php echo dp_clean($post->post_content, 120); ?>...</p><?php } echo $suf; } } # Displays a list of recent categories function dp_recent_comments($num, $pre='<li>', $suf='</li>') { global $wpdb, $post; $querystr = "SELECT $wpdb->comments.comment_ID, $wpdb->comments.comment_post_ID, $wpdb->comments.comment_author, $wpdb->comments.comment_content, $wpdb->comments.comment_author_email FROM $wpdb->comments WHERE $wpdb->comments.comment_approved=1 ORDER BY $wpdb->comments.comment_date DESC LIMIT $num"; $recentcomments = $wpdb->get_results($querystr, OBJECT); foreach ($recentcomments as $rc) { $post = get_post($rc->comment_post_ID); echo $pre; ?><strong><a href="<?php the_permalink() ?>#comment-<?php echo $rc->comment_ID ?>"><?php echo $rc->comment_author ?></a></strong> on <a href="<?php the_permalink() ?>#comment-<?php echo $rc->comment_ID ?>"><?php echo $post->post_title; ?></a><?php echo $suf; } } # Displays post image attachment (sizes: thumbnail, medium, full) function dp_attachment_image($postid=0, $size='thumbnail', $attributes='') { if ($postid<1) $postid = get_the_ID(); if ($images = get_children(array( 'post_parent' => $postid, 'post_type' => 'attachment', 'numberposts' => 1, 'post_mime_type' => 'image',))) foreach($images as $image) { $attachment=wp_get_attachment_image_src($image->ID, $size); ?><img src="<?php echo $attachment[0]; ?>" <?php echo $attributes; ?> /><?php } } # Removes tags and trailing dots from excerpt function dp_clean($excerpt, $substr=0) { $string = strip_tags(str_replace('[...]', '...', $excerpt)); if ($substr>0) { $string = substr($string, 0, $substr); } return $string; } # Displays the comment authors gravatar if available function dp_gravatar($size=50, $attributes='', $author_email='') { global $comment, $settings; if (dp_settings('gravatar')=='enabled') { if (empty($author_email)) { ob_start(); comment_author_email(); $author_email = ob_get_clean(); } $gravatar_url = 'http://www.gravatar.com/avatar/' . md5(strtolower($author_email)) . '?s=' . $size . '&d=' . dp_settings('gravatar_fallback'); ?><img src="<?php echo $gravatar_url; ?>" <?php echo $attributes ?>/><?php } } # Retrieves the setting's value depending on 'key'. function dp_settings($key) { global $settings; return $settings[$key]; } ?>
Ich muss dazu sagen, dass ich im Grunde keine Ahnung habe, aber bisher durch lesen, suchen und probieren (fast) alles hinbekommen habe....
[COLOR=#000000][FONT=Lucida Grande][/FONT][/COLOR]
[COLOR=#000000][FONT=Lucida Grande]Thumbnail for Excerpts ist installiert.
[/FONT][/COLOR]
Jetzt gerade komme ich absolut nicht weiter und wäre für jede kleine Hilfe dankbar!
Vielen Dank schonmal,
mfG,
koffer -
-
Das wars, funktioniert!
Vielen Dank!
MfG,
koffer -
Es funktioniert einfach nicht...
Mein Theme ist "Vertigo". Sobald ich z.B. das normale WP-Theme nehme, ist alles wunderbar, d.h. die zweite Ebene wird eingerückt :confused:
Ich habe eine l_sidebar.php, in der das Widget (Folding Pages (Navy Road)) erscheint:
PHP
Alles anzeigen<!-- begin l_sidebar --> <div id="l_sidebar"> <ul id="l_sidebarwidgeted"> <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?> <li id="Categories"> <h2><?php _e('Themen','vertigo');?></h2> <ul> <?php wp_list_cats('sort_column=name'); ?> </ul> </li> <li id="Recent"> <h2><?php _e('Recently Written','vertigo');?></h2> <ul> <?php get_archives('postbypost', 10); ?> </ul> </li> <li id="Archives"> <h2><?php _e('Archives','vertigo');?></h2> <ul> <?php wp_get_archives('type=monthly'); ?> </ul> </li> <li id="Blogroll"> <h2><?php _e('Blogroll','vertigo');?></h2> <ul> <?php get_links(-1, '<li>', '</li>', ' - '); ?> </ul> </li> <?php endif; ?> </ul> </div> <!-- end l_sidebar -->
und eine r_sidebar.php.
Die style.css sieht so aus:
Code
Alles anzeigen/* Theme Name: Vertigo Enhanced Theme URL: [URL="http://www.briangardner.com/themes/vertigo-wordpress-theme.htm"]Vertigo WordPress Theme : Brian Gardner[/URL] Description: Vertigo Enhanced is a modern, 3-column Widget-ready theme created for Wordpress. Author: Brian Gardner Author URI: [URL="http://www.briangardner.com"]Brian Gardner[/URL] Version: 2.0 */ body { background: #FFFFFF url(images/bg.gif) repeat-x; color: #000000; font-size: 12px; font-family: Arial, Helvetica, Sans-Serif; margin: 0px auto 0px; padding: 0px; } #wrap { background: #FFFFFF; width: 960px; margin: 0px auto 0px; padding: 0px; } /************************************************ * Navbar * ************************************************/ #navbar { background: #FFFFFF url(images/header.gif); width: 960px; height: 160px; margin: 0px auto 0px; padding: 0px; overflow: hidden; } #navbar img a{ margin: 0px; border: none; } #navbarleft { background: #FFFFFF url(images/logo.gif); height: 160px; width: 160px; float: left; margin: 0px; padding: 0px; } #navbarright { width: 800px; float: right; text-align: right; margin: 0px; padding: 10px 0px 0px 0px; } #navbarright li { display: inline; list-style-type: none; margin: 0px; padding: 0px; } #navbarright ul { margin: 0px; padding: 0px; } #navbarright a, #navbarright a:visited { color: #FFFFFF; font-weight: bold; margin: 0px; padding: 6px 10px 6px 10px; text-decoration: none; } #navbarright a:hover { color: #FFFFFF; font-weight: bold; text-decoration: underline; } /************************************************ * Content * ************************************************/ #content { width: 960px; margin: 0px auto 0px; padding: 0px; } #content p{ padding: 0px 0px 15px 0px; margin: 0px; line-height: 20px; } #content h1 { color: #000000; font-size: 22px; font-family: Century Gothic, Verdana, Arial, Sans-Serif; font-weight: normal; margin: 25px 0px 0px 0px; padding: 20px 0px 10px 0px; border-top: 2px solid #000000; } #content h1 a { color: #000000; text-decoration: none; } #content h1 a:hover { color: #990000; text-decoration: none; } #content p img{ float: left; border: none; margin-right: 15px; margin-bottom: 10px; } #content h3 { color: #000000; font-size: 22px; font-family: Century Gothic, Verdana, Arial, Sans-Serif; font-weight: normal; margin: 25px 0px 0px 0px; padding: 20px 0px 10px 0px; } #content img.wp-smiley { float: none; border: none; padding: 0px; margin: 0px; } #content img.wp-wink { float: none; border: none; padding: 0px; margin: 0px; } #contentleft { float: left; width: 470px; margin: 0px 0px 0px 0px; padding: 0px 0px 20px 0px; } #contentleft ol{ margin: 0px 0px 0px 20px; padding: 0px 0px 10px 0px; } #contentleft ol li{ margin: 0px 0px 0px 20px; padding: 0px 0px 0px 0px; } #contentleft ul{ list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px 0px 10px 0px; } #contentleft ul li{ list-style-type: square; margin: 0px 0px 0px 20px; padding: 0px 0px 0px 0px; } blockquote{ margin: 0px 25px 10px 25px; padding: 0px 25px 0px 10px; background: #E8E8E8; border-top: 2px solid #000000; border-bottom: 1px solid #000000; } #content blockquote p{ margin: 0px 0px 10px 0px; padding: 10px 0px 0px 0px; } /************************************************ * Left Sidebar * ************************************************/ #l_sidebar { float: left; width: 225px; margin: 25px 0px 0px 20px; padding: 0px 0px 20px 0px; border-top: 2px solid #000000; } #l_sidebar ul { list-style: none; margin: 0px; padding: 0px; } #l_sidebar ul li { display: inline; padding: 0px; margin: 0px; } #l_sidebar ul li a { display: block; color: #000000; text-decoration: none; margin: 0px; padding: 5px 0px 5px 0px; border-bottom: 1px solid #C0C0C0; } #l_sidebar ul li a:hover { background: #EFEFEF; color: #990000; } #l_sidebar p{ padding: 3px 0px 0px 0px; margin: 0px; line-height: 20px; } #folding_category_list li ul li {margin-left:8px;} /************************************************ * Right Sidebar * ************************************************/ #r_sidebar { float: right; width: 225px; margin: 25px 0px 0px 20px; padding: 0px 0px 20px 0px; border-top: 2px solid #000000; } #r_sidebar ul { list-style: none; margin: 0px; padding: 0px; } #r_sidebar ul li { display: inline; padding: 0px; margin: 0px; } #r_sidebar ul li a { display: block; color: #000000; text-decoration: none; margin: 0px; padding: 5px 0px 5px 0px; border-bottom: 1px solid #C0C0C0; } #r_sidebar ul li a:hover { background: #EFEFEF; color: #990000; } #r_sidebar p{ padding: 3px 0px 0px 0px; margin: 0px; line-height: 20px; } /************************************************ * Footer Background * ************************************************/ #footerbg { background: #990000; } /************************************************ * Footer * ************************************************/ #footer { width: 960px; height: 100px; background: #990000; color: #FFFFFF; margin: 0px auto 0px; text-align: left; position: relative; line-height: 17px; } #footer p { color: #FFFFFF; padding: 0px; list-style-type: none; margin: 0px; } #footer h3 { color: #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, Sans-Serif; font-weight: bold; border-bottom: 2px solid #666666; padding: 0px 0px 2px 0px; margin: 15px 0px 3px 0px; text-transform: uppercase; } #footer a { color: #AAAAAA; text-decoration: none; } #footer a:hover { color: #FFFFFF; text-decoration: none; } #footer ul { list-style: none; margin: 0px 0px 0px 0px; padding: 0px; } #footer ul li { display: inline; padding: 0px; margin: 0px; } #footer ul li a { display: block; color: #FFFFFF; text-decoration: none; margin: 0px; padding: 5px 0px 5px 0px; border-bottom: 1px solid #666666; } #footer ul li a:hover { background: #333333; color: #FFFFFF; } #footerleft { background: #990000; float: left; width: 225px; margin: 0px 20px 0px 0px; padding: 0px; } #footermiddle1 { background: #990000; float: left; width: 225px; margin: 0px 20px 0px 0px; padding: 0px; } #footermiddle2 { background: #990000; float: left; width: 225px; margin: 0px 20px 0px 0px; padding: 0px; } #footerright { background: #990000; float: right; width: 225px; margin: 0px 0px 0px 0px; padding: 0px; } /************************************************ * Search Form * ************************************************/ #searchdiv { margin: 0px; padding 0px; } #searchform { margin: 0px; padding: 0px; overflow: hidden; } #s { background: #EFEFEF url(images/search.gif); color: #333333; font-size: 11px; font-family: Verdana, Helvetica, Sans-Serif; padding: 2px; margin: 4px 0px 0px 0px; border: 1px solid #C0C0C0; } #sbutt { background: #878787; color: #FFFFFF; font-size: 11px; font-family: Verdana, Helvetica, Sans-Serif; padding: 1px; margin: 0px 0px 0px 5px; border: 1px solid #333333; } /************************************************ * Comments * ************************************************/ #commentblock { width: 430px; background: #E8E8E8; color: #000000; float: left; padding: 20px 20px 10px 20px; margin: 10px 0px 0px 0px; border-top: 2px solid #000000; border-bottom: 1px solid #000000; } #commentblock ol{ list-style-type: square; margin: 0px 0px 0px 0px; padding: 0px 0px 10px 0px; } .commentdate { font-size: 12px; padding-left: 0px; } #commentlist li p{ margin-bottom: 8px; line-height: 20px; padding: 0px; } .commentname { color: #333333; margin: 0px; padding: 5px 5px 5px 0px; } .commentinfo{ clear: both; } .commenttext { clear: both; margin: 3px 0px 10px 0px; padding: 20px 10px 5px 10px; width: 380px; background: #FFFFFF url(images/comment.gif) no-repeat top; } .commenttext-admin { clear: both; margin: 3px 0px 10px 0px; padding: 20px 10px 5px 10px; width: 380px; background: #FFFFFF url(images/comment.gif) no-repeat top; } #commentsformheader{ padding-left: 0px; } #commentsform{ text-align: center; margin: 0px; padding: 0px; } #commentsform form{ text-align: left; margin: 0px; } #commentsform p{ margin: 0px; } #commentsform form textarea{ width: 99%; } p.comments_link img{ margin: 0px; padding: 0px; border-top-style: none; border-right-style: none; border-bottom-style: none; border-left-style: none; }
Wo muss ich denn was einfügen?
Sorry, aber ich blicke nicht durch...
Danke,
mfG,
koffer -
Ja. Der "hierarchical"-Parameter muss gesetzt sein, der Rest ist CSS.
Template Tags/wp list categories WordPress Codex
Danke! Nur bekomme ich das leider nicht hin :???:
Wo muss ich die Änderung denn genau vornehmen?
PHP
Alles anzeigen<?php /* Plugin Name: Folding Pages Widget Plugin URI: [URL]http://navyroad.com/wordpress-plugins/nrs-folding-pages-widget/[/URL] Description: Provides a hierarchical list of pages for your sidebar. Author: Chris Carson Version: 1.0 Author URI: [URL="http://navyroad.com"]Navy Road Home[/URL] Credits: Thanks to Andy Skelton. Based on code by Erwin Harte ([URL="http://is-here.com/projects/wordpress/pages"]East of the Sun, West of the Moon :: Wordpress - Custom Pages Widget[/URL]) Calvin Yu ([URL="http://blog.codeeg.com/"]Don't Forget to Plant It! —[/URL]) */ function nrs_folding_pages($args){ extract($args); //var_dump($args); $sort_opts = nrs_folding_pages_get_sort_opts(); $options = get_option("nrs_folding_pages"); $title = (empty($options["title"])) ? null : $options["title"]; $sort_column = (array_key_exists($options["sort_column"],$sort_opts)) ? $options["sort_column"] : key($sort_opts); global $notfound; global $post; //returns a numerically indexed array... $pages = get_pages("sort_column=$sort_column"); //a new associative array indexed by ID... $nodes = array(); foreach ($pages as $page) $nodes[$page->ID] = $page; //an array to hold the parent ids in the current tree... $parent_ids = array(); if (is_page() and ($notfound != '1')) { $curr_page_id = $post->ID; while ($curr_page_id) { array_unshift($parent_ids, $curr_page_id ); $curr_page_id = $nodes[$curr_page_id]->post_parent; } } //add the top-level parent id, which is 0... array_unshift($parent_ids, 0 ); //output... echo $before_widget; echo $before_title . $title . $after_title; nrs_display_tree($parent_ids, $nodes, 0); echo $after_widget; } function nrs_display_tree($parent_ids, $nodes, $curr_id) { global $post; if ($curr_id) { $node = $nodes[$curr_id]; $title = wp_specialchars($node->post_title); $link = get_page_link($curr_id); $class = "page_item"; if ($curr_id == $post->ID) $class .= " current_page_item"; echo "<li class=\"$class\"><a href=\"$link\" title=\"$title\">$node->post_title</a>"; } if (in_array($curr_id, $parent_ids)) { $num_children = 0; foreach ($nodes as $node) { if ($node->post_parent == $curr_id) { if (! $num_children) echo "\n<ul>"; nrs_display_tree($parent_ids, $nodes, $node->ID); $num_children++; } } if ($num_children) echo "</ul>\n"; } if ($curr_id) echo "</li>\n"; } function nrs_folding_pages_get_sort_opts() { return array( "post_title"=>"Title", "menu_order"=>"Page Order"); } function nrs_folding_pages_control() { $sort_opts = nrs_folding_pages_get_sort_opts(); $options = get_option("nrs_folding_pages"); if ( $_POST['nrs_folding_pages_submit'] ) { $options['title'] = strip_tags(stripslashes($_POST['nrs_folding_pages_title'])); $options['sort_column'] = (array_key_exists($_POST['nrs_folding_pages_sort_column'], $sort_opts)) ? $_POST['nrs_folding_pages_sort_column'] : key($sort_opts); update_option('nrs_folding_pages', $options); } $sort_column = (array_key_exists($options["sort_column"],$sort_opts)) ? $options["sort_column"] : key($sort_opts); $title = wp_specialchars($options['title']); ?> <input type="hidden" id="nrs_folding_pages_submit" name="nrs_folding_pages_submit" value="1" /> <p><label for="nrs_folding_pages_title"><?php _e('Title:'); ?> <input style="width: 250px;" id="nrs_folding_pages_title" name="nrs_folding_pages_title" type="text" value="<?php echo $title; ?>" /></label></p> <p><label for="nrs_folding_pages_sort_column"> <?php _e('Sort:'); ?> <select id="nrs_folding_pages_sort_column" name="nrs_folding_pages_sort_column"> <?php foreach ($sort_opts as $val=>$label){ echo "<option value=\"$val\""; if ($sort_column == $val) echo " selected"; echo ">$label</option>"; } ?> </select> </label></p> <?php } function nrs_folding_pages_init() { register_sidebar_widget("NRS Folding Pages", "nrs_folding_pages"); register_widget_control("NRS Folding Pages", "nrs_folding_pages_control"); } add_action("plugins_loaded", "nrs_folding_pages_init"); ?>
Vielen vielen Dank schonmal,
mfG,
koffer -
Prima, die Seiten falten sich jetzt mit dem Navy Road Folding Pages Widget
Angelika
Hallo,
bei mir funktioniert das falten jetzt auch endlich, danke! Gibt es eine Möglichkeit, die Unterkategorien nach rechts einzurücken?
Vielen Dank,
mfG,
koffer