( Zaloguj | Zarejestruj )
![]() ![]() |
30.9.2007 - 12:23
Post
#1
|
|
![]() Grupa: Bloger Postów: 5 Nr: 3 090 |
Witam.
Na swoim blogu posiadam skórkę Webby Blue. Linki w sidebarze wyświetlane są zgodnie z kolejnością ich dodawania a nie alfabetycznie jak chciałbym żeby było. Jak zmodyfikować sidebar.php aby to zmienić? (Blogroll na mojej stronie nazwany jest "Odwiedzam") CODE <div id="sidebar">
<a href="<?php bloginfo('rss2_url'); ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/rss-icon.png" alt="Subscribe to RSS" border="0" /></a> <ul> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?> <?php /* Menu for subpages of current page (copied from K2 theme) */ global $notfound; if (is_page() and ($notfound != '1')) { $current_page = $post->ID; while($current_page) { $page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'"); $current_page = $page_query->post_parent; } $parent_id = $page_query->ID; $parent_title = $page_query->post_title; // if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) { if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_type != 'attachment'")) { ?> <div class="widget"> <h2 class="sidebartitle"><?php echo $parent_title; ?><?php _e(' - podstrony'); ?></h2> <ul class="list-page"> <?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?> </ul> </div> <?php } } ?> <div class="widget"> <h2 class="sidebartitle"><?php _e('Categories'); ?></h2> <ul class="list-cat"> <?php wp_list_cats('sort_column=name&optioncount=1&hierarchical=0'); ?> </ul> </div> <div class="widget"> <h2 class="sidebartitle"><?php _e('Archives'); ?></h2> <ul class="list-archives"> <?php wp_get_archives('type=monthly'); ?> </ul> </div> <div class="widget"> <h2 class="sidebartitle"><?php _e('Odwiedzam'); ?></h2> <ul class="linkcat"> <?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE); ?> </ul> </div> <?php endif; ?> </ul> </div> <!--/sidebar --> Ten post edytował Kasia79 30.9.2007 - 14:34
Powód edycji: wstawienie codebox
|
|
|
|
30.9.2007 - 14:32
Post
#2
|
|
![]() aktywność: ![]() ![]() ![]() ![]() ![]() Grupa: V.I.P. Postów: 856 Nr: 2 641 |
W poniższym fragmencie:
KOD <?php get_links('-1', '<li>', '</li>', '<br />', FALSE, 'id', FALSE, FALSE, -1, FALSE); ?> zamień id na name. Wtedy linki będą sortowane alfabetycznie Kasia -------------------- Curiosity killed the cat, but satisfaction brought her back.
|
|
|
|
30.9.2007 - 15:02
Post
#3
|
|
![]() Grupa: Bloger Postów: 5 Nr: 3 090 |
Dzięki wielkie, działa
|
|
|
|
![]() ![]() |
| : 23 05 12 - 12:00 |