Configure main blog page to display only certain category posts?

Discussion in 'StartPoint Business One Page WordPress Theme' started by jimslade, Apr 20, 2015.

  1. jimslade

    jimslade New Member

    Joined:
    Jul 22, 2014
    Messages:
    7
    Likes Received:
    0
    hi,
    is there a way to configure startpoint to only display blogs with a certain category? or, is there a way to hide or not-display blog posts of a certain category?

    thanks,
    -jim
     
  2. sameerwalkar

    sameerwalkar Guest

    Hello,

    Yes it is possible to display start point with a specific category. For that some customization in source code will be required. Let me know on what page do you wish to display the posts by specific category so that I can assist you accordingly.
     
  3. jimslade

    jimslade New Member

    Joined:
    Jul 22, 2014
    Messages:
    7
    Likes Received:
    0
    thanks sameer.
    i would like the home page display to only show blogs from category "MainPage".
    regards,
    -jim
     
  4. sameerwalkar

    sameerwalkar Guest

    Hello,

    Kindly provide your site URL. I will take a look of it then further guide you accordingly.
     
  5. jimslade

    jimslade New Member

    Joined:
    Jul 22, 2014
    Messages:
    7
    Likes Received:
    0
  6. sameerwalkar

    sameerwalkar Guest

    Hello,

    Ok, I found only two categories End User Products (21) Uncategorized (2) but not the "MainPage" category. Kindly create that category and send your following information:

    This Thread Link:
    Your Website URL:
    WordPress Username:
    WordPress Password:
    Send this information on our email at [email protected]
     
  7. jimslade

    jimslade New Member

    Joined:
    Jul 22, 2014
    Messages:
    7
    Likes Received:
    0
    hello sameer,
    i sent an email to [email protected], but have not received a reply yet.
    i am not comfortable sending out website login information to a general "support" email address.
    we are familiar with updating code as necessary, therefore we can change any files ourselves.
    please let us know what files to change and what code to modify.
    this does not seem like a difficult task. we only want to display posts on the main page if they have one particular category or tag.

    thanks.
     
  8. sameerwalkar

    sameerwalkar Guest

    Hello Jimslade,

    Ok. Kindly follow the below steps :
    1. Use this code for specific category:

    Code:
    <?php
    $args = array ( 'category' => 230, 'posts_per_page' => 5); // Remeber to put your category id 
    $myposts = get_posts( $args );
    foreach( $myposts as $post ) :    setup_postdata($post);
    ?>
     
    <?php endforeach; ?>
    
    2. Where to apply these codes: Follow the steps mentioned in the below images. In the images comment out or remove the highlighted code in red and paste the code that I have provided in the blue highlighted area

    startpoint-specific-blog.png
    startpoint-specific-blog-post.png

    You can also refer this video link if you face any difficulty:

    http://screenpresso.com/=4Zjyb


    Hope it will solve your query.
     

Share This Page