Pomoc w przerobieniu sidebar.php
-
Witam.
Mam problem z plikiem sidebar.php
Otóż chce zrobić tak, aby widgety były dodawane na samym dole.
I jak dodam Widget, żeby nie znikały tabelki Menu dodane właśnie w tym pliku…
Bo jak narazie wygląda to tak, że mam dodane same Widgety, a chcialbym dodac kilka ciekawych zreczy ale które tzreba dodać w kodzie, ale niestety jedno wyklucza drugie…Mógłby mi ktoś pomoć przerobić ten plik?
Kod odpowiedzialny za widgety wygląda tak:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>Da rade mi ktoś przerobić? A moze dac caly kod sidebar.php?
prosze:
<div id="side-right" class="clearfloat"> <div id="sidebar"> <?php if ( is_home() || is_page() ) { ?> <div class="kutu2"> <div class="ust2"><span></span></div> <div class="spacer"> <h2>NoVi+Sandrus <33</h2> <p> <script> <!-- /* Count up from any date script- By Website Abstraction (www.wsabstract.com) Over 200+ free scripts here! */ var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec") function countup(yr,m,d){ var today=new Date() var todayy=today.getFullYear() var todaym=today.getMonth() var todayd=today.getDate() var todaystring=montharray[todaym]+" "+todayd+", "+todayy var paststring=montharray[m-1]+" "+d+", "+yr var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1) difference+=" dni" document.write(" Razem "+difference+"!") } //enter the count up date using the format year/month/day countup(2008,10,31) //--></script> </p> </div> <div class="alt2"><span></span></div></div> <?php } ?> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <div class="ust"><span></span></div><div class="spacer"> <h2>Kategorie</h2> <ul><?php wp_list_categories('show_count=1&title_li='); ?></ul> </div><div class="alt"><span></span></div></div> <?php if ( is_home() || is_single() ) { ?> <div class="kutu"> <div class="ust"><span></span></div><div class="spacer"> <h2>Ostatnie komentarze</h2> <?php global $wpdb, $comments, $comment; $comments = $wpdb->get_results("SELECT comment_author, comment_author_url, comment_ID, comment_post_ID, comment_date, SUBSTRING(comment_content,1,50) AS comment_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT 5"); ?> <ul id="tab_content_comments" class="tab_content_list1"> <!-- Latest comments --> <?php if ( $comments ) : foreach ($comments as $comment) : echo '<li class="latestcomment">' . sprintf('%1$s <span class="commententrytitle"> - ' .strip_tags($comment->comment_date). ''.'<br />%2$s</span><br />%4$s …', '<a href="'. get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID . '" title="' . $comment->comment_author . ' - ' . get_the_title($comment->comment_post_ID) . '"><span class="meta">' . $comment->comment_author . '</span></a>', get_the_title($comment->comment_post_ID), get_permalink($comment->comment_post_ID), strip_tags($comment->comment_excerpt) ) .'</li>'; endforeach; endif; ?> </ul> </div><div class="alt"><span></span></div></div> <?php } ?> <?php if ( is_archive() || is_search() || is_page() ) { ?> <div class="kutu"> <div class="ust"><span></span></div><div class="spacer"> <h2>Archiwum</h2> <ul><?php wp_get_archives('type=monthly'); ?></ul> </div><div class="alt"><span></span></div></div> <?php } ?> <?php if ( is_home() || is_archive() || is_search() ) { ?> <div id="tag_cloud" class="kutu"> <div class="ust"><span></span></div><div class="spacer"> <h2>Chmura tagĂłw</h2> <?php wp_tag_cloud('smallest=8&largest=22&number=45&format=flat'); ?> </div><div class="alt"><span></span></div></div> <?php } ?> <?php if ( is_home() ) { ?> <div class="kutu"> <div class="ust"><span></span></div><div class="spacer"> <h2>Linki</h2> <ul> <?php wp_list_bookmarks('title_li=&categorize=0'); ?></ul> </div><div class="alt"><span></span></div></div> <?php } ?> <?php if (is_single() ) { ?> <div class="kutu"> <div class="ust"><span></span></div><div class="spacer"> <h2>Nowe wpisy</h2> <?php query_posts('showposts=10'); ?> <ul> <?php while (have_posts()) : the_post(); ?> <li class="latestpost"> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> <br /><span class="latestpostmeta"><?php the_time('j M Y') ?> | <?php comments_popup_link('Brak komentarzy', '1 komentarz', 'Komentarzy: %'); ?> </span></li> <?php endwhile; ?> </ul> </div><div class="alt"><span></span></div></div> <h2>Nowe wpisy</h2> <?php query_posts('showposts=10'); ?> <ul> <?php while (have_posts()) : the_post(); ?> <li class="latestpost"> <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a> <br /><span class="latestpostmeta"><?php the_time('j M Y') ?> | <?php comments_popup_link('Brak komentarzy', '1 komentarz', 'Komentarzy: %'); ?> </span></li> <?php endwhile; ?> </ul> </div><div class="alt"><span></span></div></div> <?php } ?> <?php endif; ?> </div> </div>
Zobacz 1 odpowiedź (z 1 wszystkich)
Zobacz 1 odpowiedź (z 1 wszystkich)
Temat ‘Pomoc w przerobieniu sidebar.php’ jest zamknięty na nowe odpowiedzi.