Front Page Static Page

Discussion in 'Blackriders WordPress Theme' started by onmark lee, Jan 6, 2014.

  1. Nitesh

    Nitesh Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    5,165
    Likes Received:
    160
    Hello,

    I can understand your problem. But instead of editing front page there is no another way to do this. Unless you develop your option penal.

    Thanks & Regards
    Nitesh Raghuwanshi
     
  2. onmark lee

    onmark lee Member

    Joined:
    Jan 4, 2014
    Messages:
    41
    Likes Received:
    0
    ok. Thanks for your reply.

    Is there any option for my to select which blog post to be appeared on home page without replace by latest blog post?
     
  3. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,

    Go to front-page.php present in your theme directory and replace the current code

    Code:
    <?php $count = 0; if (have_posts()) : while (have_posts()) : the_post(); $count++; ?> 
    with code given below

    Code:
     <?php
    $args = array(
    'category_name'=>'ENTER YOUR CATEGORY NAME HERE'
    );
    $query = new WP_Query($args);
    ?>
    <?php $count = 0; if (have_posts()) : while ($query->have_posts()) : $query->the_post(); $count++; ?>
     
    Check image for reference

    2014-03-11_1321.png

    Add your any particular category name in the code those posts you want to show on the homepage.

    Thanks & Regards
    Gourav Shrivastava
     
  4. onmark lee

    onmark lee Member

    Joined:
    Jan 4, 2014
    Messages:
    41
    Likes Received:
    0


    HI Piyush,

    I have using your method to make my home page on : http://www.liquorstoremalaysia.com/

    However, what coding should I put in to allow home page article to have some paragraphs?
     
  5. onmark lee

    onmark lee Member

    Joined:
    Jan 4, 2014
    Messages:
    41
    Likes Received:
    0
    Hi Support,

    Anyone can help me? :(
     
  6. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107

Share This Page