Mam problem z wordpresem mianowicie chciałbym wyświetlić 3 posty z kategorii "news" na górze strony i 3 w kategorii "realizacje" poniżej. Problem polega na tym że gdy dodaje post w NEWS to znika jedna wyświetlana realizacja i analogicznie odwrotnie.
Poniżej zamieszczam kody którymi wyświetlam dane:
NEWSY:
<?php query_posts('showposts=3'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if (in_category('News')) { ?> <div id="cal"> <div class="col-lg-3" id="lololol"> </div> <div style="; margin-bottom: 60px; text-align:left; color:#000;font-size:14px; font-family: "Roboto-Regular";" class="col-lg-9"> <p class="title"> <?php the_title(); ?> </p> <p style="; font-size:20px;"> <?php the_content(); ?> </p> </div> </div> <?php } ?> <?php endwhile; endif; ?>
<?php query_posts('showposts=3'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php if (in_category('Realizacje')) { ?> <div class="col-lg-4" style="margin-right:px;" id="obraz"> <div style="margin-top:40px; text-align:left;" class="nag2"> <?php the_title(); ?> </div> <div style="margin-top:40px; text-align:left" class="txt"> <?php the_content(); ?> </div> </div> <?php } ?> <?php endwhile; endif; ?>