Home page and blog with only one category post

Discussion in 'Andrina WordPress Theme' started by danteunipv, Dec 13, 2015.

Thread Status:
Not open for further replies.
  1. danteunipv

    danteunipv Member

    Joined:
    Feb 3, 2015
    Messages:
    59
    Likes Received:
    1
    Dear friend,
    I hto to have only category post on home page and blog page on this web site: http://sasseralab.unipv.it/
    Can ou help me to change the code?
    Example:
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <!-- Test if the current post is in category 3. -->
    <!-- If it is, the div box is given the CSS class "post-cat-three". -->
    <?php if ( in_category( '3' ) ) : ?>
    <div class="post-cat-three">
    <?php else : ?>
    <div class="post">
    <?php endif; ?>

    Best regards
    Dante
     
  2. priya

    priya Guest

    Hello Dante,

    Greetings from InkThemes!

    Sorry, we didn't get you..

    Could you please explain your issue a bit more so that we can assist you accordingly?

    Looking forward to your reply.

    Thanks & Regards!
    Priyanka
    InkThemes.com
     
  3. danteunipv

    danteunipv Member

    Joined:
    Feb 3, 2015
    Messages:
    59
    Likes Received:
    1
    Dear Priyanka,
    I would like only one category posts in homepage (example caterory 3) and blog page. My web site: http://sasseralab.unipv.it/
    Best regards
    Dante
     
  4. priya

    priya Guest

    Hello Dante,

    You can easily fulfil your requirement, you just need to add a simple code in your "front-page.php" and "blog.php file".

    Here I am providing you screenshots given below, please have a look.

    1) infoway_cat_limit_homepage.png

    2) infoway_cat_limit_blogpage.png

    Hope it will resolve your issue

    Do let me know if you need more assistance,

    Thanks & Regards!
    Priyanka
    InkThemes.com
     
    danteunipv likes this.
  5. danteunipv

    danteunipv Member

    Joined:
    Feb 3, 2015
    Messages:
    59
    Likes Received:
    1
    thank you! ;)
     
Thread Status:
Not open for further replies.

Share This Page