Wsparcie » Zaawansowane » Problem z sortowaniem tagów

  • Witam, mam problem z posortowaniem tagów. Domyślnie jest wg dodanego wpisu…a chciałbym posegregować wg nazwy A->Z.

    Oto kod :

    <?php foreach($tagsInCategory as $tag): ?>
                                    <li>
    
                                        <a href="<?php echo $categoryUrl . '?tag=' . $tag['slug']; ?>" class="tag-link-10"><?php echo $tag['name'];); ?>

    Czy wiecie jak rozwiązać problem?

Viewing 2 replies - 1 through 2 (of 2 total)
  • u mnie np. losowe tagi w chmurze
    – poniższy kod dodałem w functipn.php szablonu

    add_filter( 'the_content’, 'attachment_image_link_remove_filter’ );function attachment_image_link_remove_filter( $content ) { $content = preg_replace( array('{<a(.*?)(wp-att|wp-content\/uploads)[^>]*><img}’, '{ wp-image-[0-9]*” />}’), array('<img’,'” />’), $content ); return $content; }
    function custom_tag_cloud_widget($args) {
    $args[’number’] = 16; //adding a 0 will display all tags
    $args[’orderby’] = name; //adding a 0 will display all tags
    $args[’order’] = RAND; //adding a 0 will display all tags
    return $args;
    }
    add_filter( 'widget_tag_cloud_args’, 'custom_tag_cloud_widget’ );

Viewing 2 replies - 1 through 2 (of 2 total)
  • Temat ‘Problem z sortowaniem tagów’ jest zamknięty na nowe odpowiedzi.