• It seems really stupid to me that I can’t just DO this in this menu configuration or something, but here I am lol…

    I want is a menu item called “Blog” which will show all the posts in WordPress. That’s all. I’m already using the Index Loop on the homepage.

    How do I proceed?

    I’m guessing I’ll have to copy my Index Loop and modify it slightly… Increase the posts per page and figure out how to make it show excerpts instead of full posts, but I mean… Where do I even put it? Like what file? None of the existing files are appropriate, like category.php, page.php, etc. Do I have to create one not following those standards? I want the URL to be just /blog/ but I don’t even know how I’d make the connection…

    Sorry, really frustrated and confused. Something so simple that it makes me really feel dumb.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Under Settings > Reading you can choose whether the main blog is on the home page or any other page.

    Thread Starter vicky515

    (@vicky515)

    Under Settings > Reading I only see the option to configure how the homepage works. Whether it will be most recent articles, or a static page.

    https://codex.www.ads-software.com/Settings_Reading_SubPanel

    Am I missing something?

    You can also set the number of posts per page there, and to make it show excerpts instead of full posts change the_content to the_excerpt in the template file.

    Thread Starter vicky515

    (@vicky515)

    So… How do I get the posts on another page that isn’t the homepage? That’s my whole question.

    Set it to a “static page” and choose the page name from the drop-down. Of course you have to create the page first.

    Thread Starter vicky515

    (@vicky515)

    But I already have a homepage set-up. Wouldn’t that change my homepage? If you read my post I want to create a menu item titled “blog” with all the posts. Separate from the homepage.

    It would help if you could post a link. I don’t know how to make it any clearer without seeing what you refer to as your homepage and why you cannot create a page called blog and set that as your main blog page.

    Thread Starter vicky515

    (@vicky515)

    https://bit.ly/iC0cvF
    Ok. Did what you said.

    Notice homepage displays the most recent article, in it’s entirety. That is my Index loop.

    Created a page called “Blog” and set it under “Reading” like you said. It looks to me like it’s using the same Index Loop. Which I do not want. I want it to be a different loop.

    So I was asking how to achieve this.
    Clear now?

    Thread Starter vicky515

    (@vicky515)

    Sorry to bump, but I’m still looking for help with this if anyone can assist? Thank you!

    Thread Starter vicky515

    (@vicky515)

    Ok, so here’s my modified Index loop… I’ve created a “blog” page in WordPress to experiment with…

    function mod_index_query() {
    global $wp_query;
    
    	if (is_front_page()) {
    		$defaults = $wp_query->query_vars;
    		$custom = array('posts_per_page'=> '1');
    		$args = wp_parse_args( $custom, $defaults );
    		query_posts($args);
    
    	} else {
    		$defaults = $wp_query->query_vars;
    		$custom = array('posts_per_page'=> '10');
    		$args = wp_parse_args( $custom, $defaults );
    		query_posts($args);
    	}
    }
    add_action('thematic_above_indexloop','mod_index_query');

    Under “Reading”, the following “front page displays” settings cause the following set-ups.
    1. Your latest posts: Homepage shows mose recent post (expected), Blog shows blog page with no posts.
    2. A static page, Front page nothing, most recent posts nothing: Homepage shows most recent post (expected), Blog shows blog page with no posts.
    3. A static page, Front page “Blog”, most recent posts nothing: Homepage shows Blog page which has no posts, Blog shows blog page with no posts nothing.
    4. A static page, Front page nothing, most recent posts “Blog”: Homepage shows 10 most recent posts (Blog should show this), Blog shows 10 most recent posts (expected)
    5. A static page, Front page “Blog”, most recent posts “Blog”: Homepage shows Blog page with no posts, Blog shows blog page with no posts.

    I think option 1 is the best, but that i’m doing it all wrong…
    If not, then configuration #4 is the most promising… I’m confident I’m going about this all wrong though.

    Any input would be appreciated.

    note: the hook at the end is because I’m using the Thematic theme. You can disregard, as my main issue is just not understanding where to properly put this second loop, or what to link the “blog” menu item to to grab the right loop.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Do I need a custom loop?’ is closed to new replies.