Support » Plugin: Category Sticky Post » display only sticky post on front page

  • Hi,

    I would like to display only sticky posts from one category on home page. Could you help me with this?

    My code on homepage:
    “<? $args1 = array( ‘cat’ => 6, ‘posts_per_page’ => 1 ); ?>
    <?php $glowna_akt = new WP_Query($args1); ?>
    <? while ($glowna_akt->have_posts()) : $glowna_akt->the_post(); ?>

    <article>
    <h1>
    <?php the_title(); ?>
    </h1>

    <br style=”clear:both” />

    <? if ( has_post_thumbnail()) { ?>
    <figure><?php the_post_thumbnail( array(250,250) ); ?></figure>
    <? } ?>

    <?php echo the_content(); ?>

    <p style=”float:right;”>“> wiÄ™cej </p>

    </article>

    <?php endwhile; ?>

    <br style=”clear:both” />”

    https://wordpress.org/plugins/category-sticky-post/

  • The topic ‘display only sticky post on front page’ is closed to new replies.