Go Back   CodingForums.com > :: Server side development > PHP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 08-13-2009, 06:48 PM   PM User | #1
EasyCoding
New Coder

 
Join Date: Aug 2009
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
EasyCoding is an unknown quantity at this point
Question Wordpress: Blog on home page and sub-page.

Hello,

Here is a link to what I am talking about.

Right now I have set up multiple installations of wordpress since each link is going to be in blog format.

On the above link, the "Sample Post" that you see and the "MJ" one that you see are also going to be the "News Page".

Problem is, I don't know how to set this up so the news section is in more of a blog format.

I hope this makes sense.

Basically what I want is this page to stay the way it is (even though it's technically the blog page) and when I click on News I want it to be a feed of the latest news that is currently on the home page. The news page will look like this: http://www.imperial-mag.com/blog/

I want to keep it on the same install.

Hope this makes sense...

Thanks!!

OR - Can I just create a new blog page for "News" and set this page up to call in from the other installs?

Last edited by EasyCoding; 08-13-2009 at 07:02 PM..
EasyCoding is offline   Reply With Quote
Old 08-13-2009, 07:29 PM   PM User | #2
jhaycutexp
Regular Coder

 
Join Date: Apr 2008
Location: Manila, Philippines
Posts: 249
Thanks: 2
Thanked 12 Times in 12 Posts
jhaycutexp is an unknown quantity at this point
well i'm a little confused but i think i have an answer to your question..

why not create a custom page for the news page?? lets just say this is news.php..

cause basically wordpress has a default page.. of index.php.. index carries the home page.. but can display the content as a single post...

but if you wanted for example to have your single post content to have a diffrent layout or pattern... you should create like a custom page.. like for example.. single.php.. this single.php regardless of the layout of the index page.. will carry a different format from the index page....

well here's an example... this wp theme has a custom single page... http://www.registryproblemsolver.com/.. just click whatever post you like..

hope this helps..
jhaycutexp is offline   Reply With Quote
Old 08-13-2009, 07:34 PM   PM User | #3
EasyCoding
New Coder

 
Join Date: Aug 2009
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
EasyCoding is an unknown quantity at this point
I think this helps.

I can copy and paste index.php and modify as needed for single.php which is my new home page.

But how do I set that up in wordpress? I know how to create the files, but how do I set it up?

Also, the left box is "latest blog posts". the blog page is located here .

Is there a way to call in the "latest posts" from the wordpress blog install? I tried doing a php include using a URL but that gives me a ton of error messages as you can see now on the homepage.

Any help is greatly appreciated.
EasyCoding is offline   Reply With Quote
Old 08-13-2009, 07:49 PM   PM User | #4
jhaycutexp
Regular Coder

 
Join Date: Apr 2008
Location: Manila, Philippines
Posts: 249
Thanks: 2
Thanked 12 Times in 12 Posts
jhaycutexp is an unknown quantity at this point
well you don't have to.. just rename it as single.php... and it will just display the format of the single.php instead of the index.php...

single.php is like the index page.. it's a default....

i didn't get this one.. this kinda vague to me..
Quote:
Also, the left box is "latest blog posts". the blog page is located here .
Quote:
Is there a way to call in the "latest posts" from the wordpress blog install? I tried doing a php include using a URL but that gives me a ton of error messages as you can see now on the homepage
yes there is a way to call the latest post from your wordpress..


hope this helps

Last edited by jhaycutexp; 08-13-2009 at 07:56 PM..
jhaycutexp is offline   Reply With Quote
Old 08-13-2009, 07:54 PM   PM User | #5
EasyCoding
New Coder

 
Join Date: Aug 2009
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
EasyCoding is an unknown quantity at this point
Quote:
Originally Posted by jhaycutexp View Post
well you don't have to.. just rename it as single.php... and it will just display the format of the single.php instead of the index.php...

single.php is like the index page.. it's a default....

hope this helps
Thanks! And which file would the blog page be? I want what is up there now to be the home page and when people click on the "NEWS" link I would like that to open up with all the posts. Right now the home page is calling in 2 or 3 posts. The home page right now is technically the blog page. :-/
EasyCoding is offline   Reply With Quote
Old 08-13-2009, 08:05 PM   PM User | #6
jhaycutexp
Regular Coder

 
Join Date: Apr 2008
Location: Manila, Philippines
Posts: 249
Thanks: 2
Thanked 12 Times in 12 Posts
jhaycutexp is an unknown quantity at this point
here's a tip.. actually you can create as many custom pages you like...

if you want to have a blog.php page.. or news.php that is fine...

but... you have to keep in mind.. at the very top of your custom template..

you must put this code..

PHP Code:
/*
Template Name Posts: pageofpost
*/ 
like so...
PHP Code:
<?php
/*
Template Name Posts: pageofpost
*/
?>

<?php get_header(); ?>
    <div id="pageofpost_body">
        <?php the_post(); ?>
        <h1><?php the_title(); ?></h1> 
        <?php the_content(); ?>
        <div class="clear"></div>
    </div><!--endoffoot_body-->
     <?php get_footer(); ?>

then when adding a new page.. just watch for the POST TEMPLATE below.. i think that's just below the post.. where you input the texts for your posts..

and you will see a drop down box... and then choose whatever.. page format you would like to use for that post...

Good luck... )
jhaycutexp is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:08 AM.


Advertisement
Log in to turn off these ads.