No answer for allowing PHP on a page?
No answer for allowing PHP on a page?
"and then just put the loop in there and create it as a page."
How do I "create it as a page"?
Give a brief description of what you want and where you are, I don't want to read all 3 pages of posts and probably still not be able to figure out what you are asking to do. ;-)
I did it!
The Spotlight home page (index.php)
Now, I basically did the same thing as mxtrader, but I didn't realize that until I was halfway into it. I didn't understand his until then, and I did things differently. I think my files are different, because the deleting lines thing didn't line up with what was in my files.
First things first, we don't need the plugin. Don't install it. or deactivate it. (Imagine that?)
<?php
/*
Template Name: Blog Home
*/
?>
(On mine, it is on line: 220)
Leave it on the same line, it should look like:
//} else if ( is_home() && get_home_template() ) { include(get_home_template()); exit;
} else if ( file_exists(TEMPLATEPATH . "/blog.php") ) {
include(TEMPLATEPATH . "/blog.php");
exit;
}
Of course, if your blog url is different, make it match. It could be: "/blog/index.php"
Note the "false," I believe that really did the trick. I could be doubling things with still commenting out that line, but I believe this was the only combination that worked. There's probably some more correct way. But hey! :-)
Phew! Come see mine. Everything works!
Now, I have the little problem of my footer now showing up on the main page. The code is the same as the others.
For now, I'll include the actual text.
Okay, apparantly, "it" (below) needs to be set to "true." It worked before, but after fixing other site issues, it only works on true. I don't understand this coding thing, seems fickle to me! ;-)
define('WP_USE_THEMES', true);
require('./wp-blog-header.php');
And the footer was because I didn't notice that the fine lady who wrote my theme included the footer quite a bit before the sidebar is included. It was different to me. (Starburst Theme)
OK, I've read this whole thread and some others discussing the same topic. I still need help:
1. WordPress is installed in the root.
2. I have a static WP page set as the site's homepage. I am using Semiologic plugin.
The question is: how can I access the regular blog page?
Now that my blog is older, I've noticed that "next" pages / "page 2" will not work after my blog.php page. http://www.kissmestace.com/thespotlight/blog.php/page/2/ It says No input file specified. If I type in changing blog to index, it still doesn't work. This makes sense, but I don't know how to fix it.
ColourDreamer's fix worked perfectly for me, that's exactly what I wanted, thank you!
I want to add, however, that it will give you incorrect results for is_home(). For me personally I only wanted is_home() returning true for the main page (root/) and not for the journal index (root/journal/) so here was my fix:
In classes.php there is this line, that is the test for whether or not is_home returns true:
if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup)) {
which in mine was around line 200. Right before that line add this:
$journal = false;
if(strstr($_SERVER['PHP_SELF'], 'journal/')) {
$journal = true;
}
Make sure you change "journal/" to whatever your journal page is set to - and change the original to this:
if ( ! ($this->is_archive || $this->is_single || $this->is_page || $this->is_search || $this->is_feed || $this->is_trackback || $this->is_404 || $this->is_admin || $this->is_comments_popup || $journal)) {
Basically just have to add another condition of the test, checking to see if journal/ (or whatever your page/subdirectory is called) is in the URL or not.
Does everybody else have their pages (page/2) working properly? What did you do?
I created a new technique to get a static WordPress home page that does not require plugins or hacks, just a drop of a file in your theme folder. Hope you like it.
My technique does let the blog pages work OK.
This topic has been closed to new replies.