How do I create a second page besides index? Say if i want to run myotherpage.php how would I go about having to main pages? It won't matter if its in another folder.
How do I create a second page besides index? Say if i want to run myotherpage.php how would I go about having to main pages? It won't matter if its in another folder.
It depends. What do you want on it? What do you want it to do?
I want it to do the exact same thing as the homepage does
Are you asking how to have a custom page as your homepage instead of the main blog page?
in a way. I want to have my index.php with my regular theme. Then I want something like myblog.php with all the same stuff but a different theme..
Perhaps you could share your use case for this site. It sounds like you want to be able to simply switch themes but I suspect that you have something specific you are trying to accomplish. If you can share what you will be doing with the site we will have a better chance of telling you how to get there.
I want to be able to have a regular index.php page. Then have something like myblog.php with all the same content except for a different theme.I really just need a second working page.. it doesn't matter about the theme so much because i can edit that myself down the road. I just don't know how to have a second index page to get it working with all the same content thats on the same site. I want to do this so i can use a iframe to display myblog.php on another site. with another
I tried to copy and paste index.php and save it as index2.php it works but with out the content from the authors. Or it just forwards to index.php
i really just want to copy and paste index.php and save it as index2.php and get it working.. if i could do that.. that would be wonderful too
Ok, so you want to be able to go to yoursite.com/my-second-index and basically see your site as if you visited the main page.
Add something like this to the top of your index page and rename it to something like "index2.php" or whatever you want to call it.
<?php
/*
Template Name: My Second Index
*/
?>
The create a new page in your site and and choose the "My Second Index" under the template when you create the page.
Not sure it's the best way but it works.
i got a error - Warning: Cannot modify header information - headers already sent by (output started at /home/user1aaa/public_html/index2.php:7) in /home/user1aaa/public_html/wp-includes/pluggable.php on line 868
Does the top of your page look something like this..
<?php
/*
Template Name: My Second Index
*/
get_header(); ?>
If not could you paste what it does look like?
<?php
/**
* Front to the WordPress application. This file doesn't do anything, but loads
* wp-blog-header.php which does and tells WordPress to load the theme.
*
* @package WordPress
*/
/**
* Tells WordPress to load the WordPress theme and output it.
*
* @var bool
*/
define('WP_USE_THEMES', true);
/** Loads the WordPress Environment and Template */
require('./wp-blog-header.php');
?>
My bad for not explaining myself. This should be done with the index.php within your theme, not the main index.php of your install.
That file should never be altered.
ok i didn't have aligned right up at the top...
but i am still getting the problem where it redirects to index.php also known as the main page.
ok how would i view it then? mysite.com/index2.php?
or would i view it mysite.com/wp-content/themes/index2.php
Is this an external site where you could provide the link to look at? That way I can see what you behavior you are having.
I don't know what you mean by redirecting to the index.php. Do you mean you visit yoursite.com/imdex2 and it automatically redirects to yoursite.com/index.php ?
You would go to the new page you created in your backend. It will look like your index because it has all the same info but it would have a url of yoursite.com/yournewpage/
currently its a inside site. well i want to be able to view index.php and index2.php how would i view index2.php ?
i went to mysite.com/index2 and i can't view it.
You would view index.php by visiting yoursite.com and you would visit index2.php by visiting yoursite.com/the-page-you-created-in-your-admin-with-the-index-page-template-you-created-with-the-php-I-shared-above/
You have to create a page in your admin with the page template we created above from your index.php file. When you create that page it give you the url right under the title.
ok i know what did wrong i forgot to select it. Thank you.. this may just work...
Glad to hear it. Keep us posted. ;-)
cool thank you so much.. ok.. my next trick is how do i get all the most recent site posts to show up?
From this current site or from all network sites? From this current site should be automatic. If you want it from all network sites, http://wordpress.org/extend/plugins/wordpress-mu-sitewide-tags should do the trick.
I would like to pay you some money for all your help and your quickness..
It is totally not necessary. I'm happy to help and that's what these forums are for. If you ever need more substantial help with a project you can always look me up. ;-)
you know what i did miss something.. its not pulling in the latest posts for some reason
I mean its not pulling in any posts.. is there a setting for this somewhere?