Forums

Pages and articles question (3 posts)

  1. VanillaSky7
    Member
    Posted 1 year ago #

    Hello WP Community!

    I am developing a simple WP based shop. I have pages list (as upper menu) and categories list (as lower menu intended for goods categories).

    I would like to post articles as blog on two pages "Новости" ('News') and "Статьи" ('Articles'). As far as I understood it is possible to select one page as blog in 'Reading' preferences however I do not know how I can handle to select both and be able to post new article to one of those pages.. Can anyone help with this??

    http://www.ali-baba.in.ua/

    Thanks in advance!

  2. wearitwell
    Member
    Posted 1 year ago #

    Hi!
    For this you could either use plugins (if you're not so firm with php)
    Query Posts and
    Shortcode any widget
    As described here.

    or write my own code.
    Make a new page template, use this code snippet as a starting point to develop. (Change cat=5 to your value).

    <?php
        $displayposts = new WP_Query();
        $displayposts->query('cat=5');
        while ($displayposts->have_posts()) : $displayposts->the_post();
    ?>
      <?php the_content('read more...'); ?>
      <?php edit_post_link('edit', '', ''); ?>
    
    <?php endwhile; ?>

    good luck
    Anja

  3. VanillaSky7
    Member
    Posted 1 year ago #

    Thanks Anja,

    I am trying to solve that issue with Query Posts + Template Tag Shortcodes. Initially when I got all the posts queried by post publish statuses it worked (however at the excerpt it was not shown images), now I am trying to query posts by tags and I can not make it working. Do you know what can be the reason?

    I f you need more details, I will provide them.

    Thank you very much!!
    Andrey

Topic Closed

This topic has been closed to new replies.

About this Topic