StudioPress Community Forums

StudioPress Community Forums (http://www.studiopress.com/support/index.php)
-   General Discussion (http://www.studiopress.com/support/forumdisplay.php?f=7)
-   -   Full post blog functionality on the front page (http://www.studiopress.com/support/showthread.php?t=10070)

StephanieV 06-20-2009 11:00 AM

Full post blog functionality on the front page
 
This may seem like an odd request, and that it might defeat the purpose of such themes, but I'd like to have full post blog functionality on the first page.

In other words, right below the the featured content gallery, in the first content box area, I'd like my blog to begin, the ability to post formatted posts like actual blogs, with time stamps, comments, etc., but still retain the left-aligned thumbnail pic.

Is this even possible?

I'd appreciate any advice. Thank you so much.

CharlesClarkson 06-20-2009 03:12 PM

Re: Full post blog functionality on the front page
 
Quote:

Originally Posted by StephanieV
This may seem like an odd request, and that it might defeat the purpose of such themes, but I'd like to have full post blog functionality on the first page.

That's not odd. It's thinking outside the box. And it is possible.

WordPress uses a number files to produce the front page of your web site. Among them are header.php which contains the header image and menus right about up to the Featured Content Gallery (FCG). Below that is home.php. And then footer.php comes last. It's not that simple, but that is the order of those files.

If you change the markup after setting the FCG in home.php and if you still call the sidebars and the footer like home.php then you could place just about anything under FCG and get the same look and feel as the Church theme. However, you may need to do some CSS work to make it look right. The page_blog.php file is used to create a blog page. It has a lot of the markup you need to add below FCG.

So, you're going to have to get your hands dirty or you are going to have to hire someone else to get their hands dirty. It depends on how you value your time. It may take a long time for an inexperienced designer to get this just right.

You should know enough about xhtml and CSS to be able to write valid markup. Knowing how to search Google for help and a good text editor are a plus. You will need patience and a good sense of humor.


HTH,

StephanieV 06-20-2009 03:20 PM

Re: Full post blog functionality on the front page
 
Hey, thanks for the thorough reply. Not sure I can accomplish either way. But I guess I'll see what I can do! :?

StephanieV 06-20-2009 04:49 PM

Re: Full post blog functionality on the front page
 
I've actually almost got this puppy figured out. At least it looks right - haven't completely tested it yet. Now here's a follow-up question:

To achieve this effect, I simply made the archive page the home page, then added in the code for the featured content plugin.

Now, here's the thing: With the archive page now doubling as the blog page on the home page, it's displaying all the categorie and I only need it to display ONE category. So I guess I need a code snippet that will force it to display one category - and of coure the right place to put it.

Any ideas? Thank you in advance!

CharlesClarkson 06-20-2009 08:24 PM

Re: Full post blog functionality on the front page
 
Quote:

Originally Posted by StephanieV
To achieve this effect, I simply made the archive page the home page, then added in the code for the featured content plugin.

I have created a Monster.


Quote:

Originally Posted by StephanieV
Now, here's the thing: With the archive page now doubling as the blog page on the home page, it's displaying all the categorie and I only need it to display ONE category. So I guess I need a code snippet that will force it to display one category - and of coure the right place to put it.

No. That would be telling. :P


Oh. Alright, but I'll only meet you half way. You have to read how to use this function on your own.

Add the query_post() function above the this line of code:
Code:

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

<?php query_posts('something else goes here and I'm not telling') ?>

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


HTH,

StephanieV 06-21-2009 01:12 PM

Re: Full post blog functionality on the front page
 
nah, doing what you suggested removes all the other categories but the same 10 posts from the desired category repeat on each page.

hmmm...

CharlesClarkson 06-21-2009 04:57 PM

Re: Full post blog functionality on the front page
 
Quote:

Originally Posted by StephanieV
nah, doing what you suggested removes all the other categories but the same 10 posts from the desired category repeat on each page.

hmmm...

What did you use?

CharlesClarkson 06-22-2009 06:03 AM

Re: Full post blog functionality on the front page
 
Quote:

Originally Posted by StephanieV
nah, doing what you suggested removes all the other categories but the same 10 posts from the desired category repeat on each page.

Sorry. That's my fault. When I used query_posts() I forgot about paging. We have to retrieve the page number from the previous query first.
Code:

<?php $page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=1&showposts=5&paged=$page"); ?>
Where 1 is your category and 5 is the number of posts per page. $page contains the page number of the current page. showposts should match the Genreal->Reading->"Blog pages show at most" setting.


HTH,


All times are GMT -5. The time now is 09:50 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.