Single category on home page without using a plugin?

General questions pertaining to how certain issues can be resolved
Forum rules
1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"

Single category on home page without using a plugin?

Postby Jak » 20 May 2012, 20:18

I would like to have the home page only show posts from one category, with all posts on another page. I have done this with other themes using the solution offered on the WP forum of adding
Code: Select all
<?php query_posts($query_string . '&cat=8'); ?>

before 'the loop' in index.php. It worked beautifully!

I'm now setting up a new blog with the Suffusion theme (and loving it!) and would like to do this again, however I can't seem to locate the 'the loop'.

I've searched the Aquoid forum and all the results I could find about this recommend using a plugin to exclude all other categories. I prefer the clean approach of simply adding one line of code and would rather avoid plugins where not absolutely mandatory. Any suggestions on where I could find 'the loop' in the Suffusion theme or where to add the line of code?
Jak
 
Posts: 2
Joined: 20 May 2012, 19:34

Re: Single category on home page without using a plugin?

Postby Jak » 20 May 2012, 20:44

Well, that just figures! found it, in the index.php file...

Line 19, right after
Code: Select all
<?php suffusion_before_begin_content(); ?>
      <div id="content" class="hfeed">


Spent a couple of hours trying to solve this, posted here, then almost immediately found it...
/me slaps forehead :roll:

Cheers! :lol:

RESOLVED
Jak
 
Posts: 2
Joined: 20 May 2012, 19:34

Re: Single category on home page without using a plugin?

Postby mcfilmmakers » 08 Sep 2012, 10:28

Could you explain what exactly you did?

I'm looking to exclude 2 categories from showing up on the index page, but I want to do this from the functions file rather than create a child index page. Is this possible?
mcfilmmakers
 
Posts: 60
Joined: 28 May 2012, 12:25

Re: Single category on home page without using a plugin?

Postby sayontan » 08 Sep 2012, 10:36

mcfilmmakers wrote:I'm looking to exclude 2 categories from showing up on the index page, but I want to do this from the functions file rather than create a child index page. Is this possible?

Use a plugin like "Simply Exclude"
Sayontan Sinha | http://mynethome.net/blog | http://www.aquoid.com/news
I don't do freelance work (for Suffusion or otherwise), so please don't contact me for quotes or offers.
sayontan
Site Admin
 
Posts: 10159
Joined: 15 Sep 2009, 16:39
Location: Houston, Texas


Return to Support Requests

Who is online

Users browsing this forum: Google [Bot], howdreamswork, nartiappicarl, Thomas F, yggisnln and 10 guests