Theme Support Forum

Support Forum for Free and Premium Themes. Premium Theme Forums are Private! Please log in first to see the Premium forums

Viewing 10 posts - 1 through 10 (of 10 total)

Limit Number of posts

Home Forums Misc. General Forums Limit Number of posts

  • #13281

    kirn

    subscriber

    Hi there

    Is there any way to limit the number of posts displayed on the front/home page to just 3?

    Let me know

    Thanks so much 🙂

    #20954

    Towfiq I.

    administrator

    Go to Settings> Reading and set number of posts per page from there.

    #20955

    kirn

    subscriber

    Great, that worked, but now all my pages only show 3 posts.

    Is there anyway to limit the number of posts only for the front/home page?

    #20956

    Towfiq I.

    administrator

    open up layout1.php and add this :

    <?php
    if (is_home()) {
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    query_posts("posts_per_page=5&paged=$paged");
    }
    ?>

    before this:

    <?php if(have_posts()): ?><?php while(have_posts()): ?><?php the_post(); ?>

    #95299

    Alexandra Kolar

    subscriber

    Hi,

    I am also trying to limit the number of posts that appear on the home page. I followed the instructions provided in this forum, but it didn’t change the number of posts that appear on the home page to 3. Instead, it seemed to add a button to see more posts below the thumbnails for all of the posts that are appearing. Like this: (1) – (2)

    I am also a beginner, so I apologize for lack of vocabulary/general understanding.

    Thanks!
    A.

    #95422

    Towfiq I.

    administrator

    @Alexandra whats your site address?

    #95516

    Alexandra Kolar

    subscriber

    It is in testing at:

    http://s412390857.onlinehome.us/

    Since my question I have run into other things that I was wondering could be changed:

    1. The blog page which I am using as a Portfolio is only showing 6 posts on the page, and I would prefer to have it show all of them with the button to scroll back up as needed.

    2. The blog page is archiving by date, and I was wondering if I can disable the archiving by date and instead archive by “Category” and add more “Recent Posts” down the side bar

    3. On the services page I chose to use the toggle feature for the various programs we offer, and I know it is counter-intuitive, but is there a way to set the toggle to default in the expanded position so that the toggle can be used to see less if the reader chose?

    Thanks a lot. I am completely new to word press, so I will continue to apologize for my lack of general know-how.

    A.

    #95628

    Towfiq I.

    administrator

    1. Open up page-blog.php and replace the number 6 with 99

    2. sorry I dont understand what do you mean by “archive by category” since the blog page template only get posts from one category.

    3. Open up asteria.js and remove this:

    jQuery('.lgn_toggle_content').hide();

    #95837

    Alexandra

    Thank you,

    The portfolio page is showing everything now which is great. I am still needing assistance with the following:

    1. Limiting the number of posts that show on the home page to 3
    2. Removing the buttons that are appearing just below the recent posts on the home page (1) – (2) – (3) …
    3. I am hoping to get the right side bar on the blog page to only show:
    – Recent Posts
    – Categories
    …. and remove the archiving by date as well as the comments, as commenting will not be functional.
    4. Lastly (i hope!) I cannot find the asteria.js file in the editor to adjust the toggle setting, is it somewhere else?

    Thanks again, your service is top-notch and very helpful for a beginner such as myself!

    A.

    #97492

    Towfiq I.

    administrator

    1. Open up functions.php and add this:

    set_query_var( 'posts_per_page', '3' );

    before this:

    if(!empty($asteria['enable_cat'])){

    2. Add this to your Custom CSS:

    .home .ast_pagenav{display:none;}

    3. Go to Appearance> Widgets and take all the unnecessary widgets off.

    4. you cannot access any .js files with Appearance> Editor. to access them use ftp or try this plugin:

    http://wordpress.org/plugins/solid-code-theme-editor/