• 1. mam w szablonie portfolio. Kod w szablonie strony wygląda następująco:
    <section id=”portfolio”>
    <nav id=”filter”><span>Filter:</span></nav>
    <div class=”clr”></div>
    <section id=”container”>
    <ul id=”stage”>
    <?php
    $the_query = new WP_Query( array( 'post_type’ => 'portfolio’, 'orderby’ => 'title’, 'order’ => 'ASC’ ) );

    while ( $the_query->have_posts() ) : $the_query->the_post();

    $thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id ( $the_query->ID ), 'thumbnail’ );
    $full = wp_get_attachment_image_src( get_post_thumbnail_id ( $the_query->ID ), 'full’ );

    $cats = wp_get_object_terms( $post->ID, 'portfolio_category’ );

    $items = array();
    foreach ( $cats as $cat ){
    $slug = $cat->slug;
    $items[] = $slug;
    }
    $counter = count($cats);
    $i = 0;

    ?>

    <li data-tags=”<?php
    foreach ( $items as $tag ){
    if (++$i === $counter ){
    $tags = $tag;
    }
    else{
    $tags = $tag . ’, ’;
    }
    echo $tags;
    }
    ?>”>” rel=”lightbox[gallery]„><img src=”<?php echo $thumbnail[0] ?>” style=”width:194px;height:194px;background:#3a5a97;”>

    <?php
    endwhile;
    ?>

    </section>
    <div class=”clr”></div>
    </section><!–/portfolio–>

    a w functions.php coś takiego:
    function portfolio_menu() {
    $args = array(
    'public’ => true,
    'label’ => __( 'Portfolio’ ),
    'supports’ => array( 'title’, 'thumbnail’ )
    );
    register_post_type( 'portfolio’, $args );
    register_taxonomy( 'portfolio_category’, 'portfolio’ );
    }
    add_action( 'init’, 'portfolio_menu’ );

    i teraz tak. jak w Ustawieniach=>Czytanie=>Strony blogu wyświetlają maksymalnie ustawie liczbe stron na 3, to w portoflio też wyświetlają się 3 elementy. jak zrobić portfolio było niezależne od tego i wyświetlało np max 999elementow a blog tak jak w ustawieniach 3?

    2. i drugie pytanie. gdy używam funkcji <?php query_posts( 'showposts=2′ ) ?> żeby określić liczbe postów którę mają się wyświetlać na blogu, to funkcja działa ale nie do końca. wyświetla np 2 posty ale jak chce przeskoczyć do następnych dwoch, to znowu wyskakuja mi te same posty co na pierwszej stronie. co jest nie tak?
    dodam że do nawigacji używam previous/next_posts_link

Temat ‘Dwa pytania.’ jest zamknięty na nowe odpowiedzi.