What does Filosofo Home-Page Control do?
Filosofo Home-Page Control is a WordPress plugin that lets you:
- put pages on the same Permalink level (or higher) as the blog’s directory and
- set which page you want to be the “home” page.
Why would I want to do that?
- Let’s say you wanted to use WordPress as a Content Management System, or CMS. If your website is
www.example.com, you might want a page with relatively static content (i.e. not your most recent blog posts) to greet your visitors when they loadwww.example.com. - One way to accomplish this is to add a file named
to your theme; automatically, WordPress will open that page as the home page. Instead, this plugin allows you to choose any of your existing pages to be the default homepage, without having to create a
home.php
file.
home.php
- Something else you might want to do is make a sub-directory of your site, say “blog,” to be the home of your blog entries, while allowing other pages to be on the same level (or higher) as that of the blog directory. For example, in addition to
www.example.com/blog, you might want something likewww.example.com/aboutorwww.example.com/my_pet_frogs. (Normally, if the blog resides inwww.example.com/blog, pages would be under that directory, so that you would havewww.example.com/blog/aboutinstead ofwww.example.com/about.)
Note: This plugin is not necessary if you are using WordPress version 2.1+
WordPress version 2.1 and newer includes its features, and you can access them under Options > Reading, so you do not need to install this plugin.
Will it work on my blog?
I’ve tested it successfully on WordPress blogs of version 1.5 and newer, including 2.0.
However, you do need to be able to use mod_rewrite in your .htaccess file, which is another way of saying you should already be using Permalinks.
See the “Warning” below which applies to those using WordPress versions prior to 2.0 and especially to those who are unfamiliar with creating or deleting files.
Where do I download it?
Filosofo Pages on a Different Directory 0.8.3 | October 22, 2006
Installation Instructions
Note: this plugin’s functionality is built in to WordPress 2.1 and newer, so there is no need to use it for those versions.
- Download one of the files above and extract it. Then upload the
file into your WordPress plugins directory, and activate it under Plugins in the admin control panel. (You must be using “Pretty” Permalinks; in other words, Permalinks cannot be set to “Default” aka “off”.)
filosofo-home-page-control.php
- Navigate to Options » Home-Page Control and choose which page you want to be the home page of your site (or go with the WordPress default), and choose the directory in which you want your blog’s main page to appear.
Note: this does not mean that you should create a real directory of that name on your server; rather, simply entering the name of your “directory” will make it appear as though there is such a directory, even though it doesn’t actually exist. - (Optional but highly recommended): Navigate to Options » Permalinks and prepend to the custom Permalink structure the directory name that you chose above. That way, it will appear that the individual posts, categories, etc., reside in the same directory as the blog’s main page.
So, for example, you might change your permalink structure from/%year%/%monthnum%/%day%/%postname%/to/blog/%year%/%monthnum%/%day%/%postname%/, if “/blog” is the directory you want your blog to appear in. - This step #4 is not necessary for WordPress 2.0. Navigate to Options » Permalinks and press the button to update your Permalink structure. If your
.htaccessfile is not writable, you may need to copy and paste the Permalink structure into the.htaccessfile.
For users of older WordPress versions
If you’re using any version of WordPress older than 2.0 (i.e. 1.5.x), read this.
Frequently Asked Questions
My template has a home.php file. Will the plugin still use that file?
Yes. By default, WordPress uses home.php on your home page, and this plugin does not change that behavior. In other words, whatever page you select as the “home” page will use the home.php file as though it were the template for that page. You may also use a custom template for the “home” page, or just the page.php or index.php as normal.
“is_home()” returns true on the “home” page. How can I tell when I’m on the blog’s main page, but not viewing an individual blog post?
Use this as the test:
if (!is_single() && !is_page())Using the plugin, I now have my blog posts in a “directory” named “/blog,” but the sidebar has disappeared. How can I make the sidebar reappear on the /blog page?
Some themes use conditional statements in their sidebar.php files so that the sidebar appears only on the “home” page. Try editing your sidebar.php file, replacing something like
with
<?php if (is_home()) { ?>
.
<?php if (!is_single()) { ?>
Using the plugin, I now have my blog posts in a “directory” named “/blog,” and I want a link to “/blog” in my sidebar. How can I make a link to “/blog” in the sidebar without manually editing my theme template?
One way to do this is to create a dummy page with the “Post slug” of “blog” and title of something like “My Blog.” Then it will appear in the list of pages in your sidebar, but when you click the link to “/blog,” WordPress will ignore the dummy page and instead take you to blog “directory.”
I’ve de-activated the plugin, but WordPress acts as though it’s still activated.
Re-save your permalink settings to flush the rewrite rules cache.
How do I get “Blog” to appear in the title of my “blog” page, instead of just my site’s name?
Add these lines to your theme’s functions.php file or at the bottom of the plugin file:
function blog_page_custom_title($a,$b) {
$t = 'Blog'; // the text to appear in the 'blog' title
if ( !is_home() && !is_single() && !is_page() ) $a .= " $b $t";
return $a;
}
add_filter('wp_title','blog_page_custom_title',1,2);
If you run into any problems or have comments or suggestions, please leave a comment in my support forum or email me at if.website (located at) gmail (dot) com .
For feedback on the plugin (and for tips on Webhosting and SEO) go to Web Hosting Plans and Reviews.
See some of the other WordPress plugins I’ve created.
Like this plugin? Is it worth a latte?
This month I have received $44.00 for my plugin coding work, which is about $0.01 per download.
29 Trackbacks/Pingbacks
[...] Ok now I had installed Wordpress on my root (I forgot to mention this in my previous post), so my blog was being published to http://sabarish.net, but I wanted that to be my home page address and my blog address to be http://sabarish.net/blog. I created a new page called Home with some static content to be displayed as my home page. I then installed a plugin called Filosofo Home-Page Control which let me control which page is displayed as the home page and which as the blog page. Hat tip: Nandu anna for mailing me that plugin. After this, I had to modify the header.php file of the theme to add a link to point to the Home page and had to modify the blog url to include “/blog”. [...]
[...] A lot of things happened since I last posted, for one I upgraded my Wordpress install to the new release 2.0. With that I actually put in some more effort into the site too. The old image gallery is back, it can be accessed here, it has been redone with a Wordpess plugin called Lazyest Gallery, it sort of takes a simmilar approach as Mig, leaving it to you to arrange your photos in a folder hierarchy, and it’ll display galleries based on it. Another mod, Filosofo Home-Page Control allows me to not show the Blog page as the home page, making this into something more like a website. I use Fold Page Menus in order not to show all the page clutter. And to remove the classic Register/Login links on the sidebar, I use Admin Menu to instead display a bar actross the top of the site. And lastly, a small touch, links get prettyfied (by having icons added to external links among others) via Link Indication. [...]
[...] Se ha discutido mucho sobre las diferencias entre un blog y una web est?tica. Con el pugin Filosofo Home Page Control es posibe combinar el dinamismo e interactividad de un blog con la mejor navegabilidad de una web est?tica al uso. [...]
[...] Con el pugin Filosofo Home Page Control es posibe combinar el dinamismo e interactividad de un blog con la mejor navegabilidad de una web estática al uso. [...]
[...] Filosofo home page control - allows you to create a wordpress front page and have the journal on a sub page. Just what I was looking for for some of my future site designs here. [...]
[...] Standard i Wordpress är att senaste inläggen i bloggen läggs upp på framsidan. Med insticksprogrammet Filosofo Home-Page Control kan man välja en statisk sida som framsida. [...]
[...] ??Filosofo Home-Page Control??????????????????What’s New?page???????WP????CMS?? cms homepage page [...]
[...] WordPress plugin: Home-Page Control ???????????blog [...]
[...] New?page???????WP????CMS?? Posted in Wordpress RSS 2.0 *Name [...]
[...] Wem das zu komplex ist, möge sich das Wordpress Plugin Filosofo Home-Page Control anschauen, auch ok für den gleichen Zweck. [...]
[...] To install and activate the plugin, download the plugin here, unzip it to your hard drive, then upload it to the wp-content/plugins folder on your server. After that, you’ll want to visit the Plugins page on your control panel, and activate the plugin. If you haven’t done it yet, you’ll need to create a new page that you want to use as your homepage (call it whatever you want). After you do that, click the Options tab, then look for the link called “Home-Page Control.” Once you make it to that page, just assign your chosen page as the home page and click “Save.” [...]
[...] I’ve used a WordPress plugin to set a “static” Page to be the home page of a site. But what if you want both a static site *and* a blog? That plugin didn’t work. Happily, there’s another WordPress plugin, Filosofo Home-Page Control, that does it *so* smoothly and easily. Install plugin. Choose which page to be the home page. Declare the directory you wish for your blog. [...]
Die besten WordPress Plugins - Administration » Tipps zur Suchmaschinenoptimierung…
Filosofo Home-Page Control
Allows you to set one of your pages as the home page….
[...] Filosofo Home-Page Controlæ’件下载åŠè¯¦ç»†ä½¿ç”¨è¯´æ˜Žç‚¹è¿™é‡Œã€‚ [...]
[...] Plugin 1: Filosofo Home-Page Control [...]
[...] Plugin 1: Filosofo Home-Page Control [...]
[...] Filosofo Home-Page Control: lets me set a particular page as the home page, and also to separate the blog to a subdirectory, even if it’s at the root level. At first, you don’t get the point, until you realize you can use WordPress to run a regular site by creating pages, then add a blog to a subdirectory later and specify that subdirectory through this plugin. In other words, you run the site pages at http://www.example.com and the blog at http://www.example.com/blog. Really, really nice. [...]
[...] Filosofo Home-Page Control [...]
[...] Filosofo Home Page Control is a plugin that allows a user to alter the default homepage for the WordPress installation. This is in case one doesn’t agree of having the blog as a default WP homepage. [...]
[...] Plugin 1: Filosofo Home-Page Control [...]
[...] Player,Dagon Design Sitemap Generator,DropCap First Character,Filosofo Home Page Control,flickrRSS,Google XML Sitemaps,Gravatar,Highlight Author Comments,WordPress Database [...]
[...] Home-Page Control [...]
[...] Filosofo Home-Page Control- This plug-in lets you put pages on the same Permalink level (or higher) as the blog’s [...]
[...] Plugin 1: Filosofo Home-Page Control [...]
[...] Plugin: Here 43) Filosofo Home-Page Control- [...]
[...] a plugin such as Filosofo Home-Page Control (http://www.ilfilosofo.com/blog/home-page-control) instead. It works fine with WP installed in [...]
[...] Filosofo Home-Page Control: I wanted to move out the blog to the side, and while this seemed a quite straight forward job (add a home.php to the theme and copy the index.php into blog.php, to use that as a template for the blog listing usually does the job) it clashed with K2. And once again I didn’t feel that I wanted to debug or extend other people’s code. Home-Page Control does what it says on the tin: move the blog out into a subfolder, use something else as homepage. [...]
[...] Filosofo Home-Page Control- This plug-in lets you locate pages on the aforementioned Permalink take (or higher) as the [...]
[...] Filosofo Home-Page Control: lets me set a particular page as the home page, and also to separate the blog to a subdirectory, even if it’s at the root level. At first, you don’t get the point, until you realize you can use WordPress to run a regular site by creating pages, then add a blog to a subdirectory later and specify that subdirectory through this plugin. In other words, you run the site pages at http://www.example.com and the blog at http://www.example.com/blog. Really, really nice. [...]
276 Comments
This looks very god - I might look into it in a week or two (I am too busy at the moment) - I’ve been wondering about turning WP into a CMS for awhile now, since I need a personal website as well as a blog.
Thanks for this plugin. I’ve used it as you suggested to make WordPress a CMS for my home church’s website. It makes things much easier for the pastor to update the website on his own.
I use your JavaScript Extract plugin on my personal blog as well. Thanks for that one too.
Hi, I am attemting to set this plugin up and when I go to set the new home page under Options Home Page Control, I receive the following error.
Cannot load filosofo-home-page-control.php.
Note permalinks are working fine on this web site.
Any help would be greatly appreciated.
Cheers
Ed
Ed, what version of WordPress are you using?
To what link does the Options > “Home-Page Control” tab point? It should look like [php]
http:// [your site] /wp-admin/options-general.php?page=filosofo-home-page-control.php
[/php]
Are the file permissions of the plugin file set so that it’s readable?
Hi Filosofo,
I am using WP 2.0 which is set up by Fantastico on Bluehost.
The link points to:
http://localstoremarketing.biz/wp-admin/options-general.php?page=filosofo-home-page-control.0.6.7/filosofo-home-page-control.php
Note the small difference to your link…I guess is the version no?
Also I checked file permissions and yes they are readable by User/Group/World. Can only be written by User, and no execution rights by user/group or world.
I hope this helps.
Cheers ang thanks
Ed
The plugin file itself should be named [php]
filosofo-home-page-control.php
[/php]
and be sitting in the
wp-content/pluginsdirectory; it should not be in another directory (such asfilosofo-home-page-control.0.6.7). That may be what is causing you a problem.THis did the trick. Maybe I should read the install instructions better
Thanks for your help and for this great plugin.
Cheers
Ed
hi. thanks for this plugin. it’s great. i wonder if you have tried it with the ol_feedburner plugin? i can’t seem to get the two to behave together. it seems that instead of redirecting my visitors to feedburner, they get redirected to /feeds/ on my site instead. - donovan.
Donovan, what version of WordPress are you using?
Hi, I’ve installed this plugin and activated it successfully. I went into the options and set my “home” page as home, instead of my blog but for some reason it doesn’t seem to work. When you click on “home” in the menu it takes you there, but it’s not the default page. Any ideas as to what might be going wrong?
Vanessa, looking at your site it seems you don’t have permalinks activated.
Hi. I’m using 2.0. Going to upgrade to 2.0.1 in an hour or so. I’ll subscribe to the RSS feed for these comments so I can remember to followup on this. Thanks.
First of all: Many thanks for your plugin, it is a great solution for using a static front page.
However, I am having one issue:
When the home of your blog entries is being displayed, the wordpress functions previous_posts_link() and next_posts_link() provide a wrong url.
Example:
http://www.mysite.com. Blog directory that is set in the Home-Page-Control options is “blog” (so the blog directory is http://www.mysite.com/blog/)
When loading http://www.mysite.com/blog/ and clicking the output url of next_posts_link(), a 404 error occurs. The URL being generated by next_posts_link() is http://www.mysite.com/blog/page/2/. But WordPress expects http://www.mysite.com/page/2/ (without the “blog” inside the URL).
Hmm, I think about using a RewriteRule to solve this issue. Or do you have any other suggestion?
OK, just created a RewriteRule that works so far:
**IfModule mod_rewrite.c##
RewriteEngine On
RewriteBase /
RewriteRule ^blog/page/([0-9]+)/$ /page/$1 [L,R]
**/IfModule##
(replace ** and ## with angle brackets)
Michael, that’s very similar to what I have:
[php]
RewriteEngine On
RewriteRule ^blog/page/?([0-9]{1,})/?$ /index.php?&paged=$1 [QSA,L]
[/php]
I’ll see what I can do about incorporating that into the plugin.
Okay, Michael. I’ve updated the plugin to version .7 so that now it should create the necessary rewrite rules automatically.
Great, thanks a lot, Austin. It’s working perfectly.
Hi Michael, great plugin thanks. I noticed one weird thing: in WP 2.0.1 when I save a post, I cannot preview it, it just shows the home page, not the post. Any ideas what can be done about this?
Oops I meant filosofo
Rachel, I think I’ve fixed the problem in what I’ve just uploaded as version 7.1.
You’ll need to re-save your settings under Options > Home-Page Control to clear the cached rewrite rules.
Thanks - I gave that a go and resaved my settings but nothing changed? Is there anything else I should do?
I was having a similar issue like Rachel has described: when I created a new post and saved it (not published), the preview just displayed a search result with the message “no hits”…
But I just have upgraded to .72, and now it works.
Austin, thanks again for this great plugin.
This plugin doesn’t seem to work correctly if used with the permalink redirect by Scott Yang. Once the permalink redirect plugin is activated, when I attempt to navigate to the “blog directory”, I’m redirected to the main home page.
Jason, here’s a patch for the permalink plugin that seems to work for me:
14c14
< is_comments_popup())
—
> is_home() || is_comments_popup())
In other words, change line 14 so that it returns on the blog index page.
Works great. Thanks buddy.
Hi again
Will this plugin work with the Wordpress search box?
Rachel, I see the problem and will have a fix up in the next day, hopefully.
Okay, .73 should solve the problem.
Thanks for this plug-in. It seems to be just what I needed. I want to have a static front page and a menu link to the normal blog. Everything works as it should except on then new /blog page, the side bar is missing. I am using the k2 theme. How do I get the side bar back on the blog page?
Steve, to decide whether to print the typical sidebar stuff, the k2 theme checks to see whether the is_home() function returns true (and it checks some other things as well). The way I’ve designed the plugin, is_home() returns true for the home page, which is whatever you set it to be, instead of the /blog page.
Look in the k2 theme’s sidebar.php file, and you can modify the if . . . else statements for your needs.
Hi,
I’ve just installed the Home-Page Control plugin. I created a page called “Home” and set it to be the homepage, but it seems to ignore me and wants to make a blog entry the homepage. I pressed the button to update the permalink structure but to no avail. Any ideas what might be wrong? I’m using 2.0.2 of WordPress and 0.7.3 of the plugin.
Mark, under Manage > Posts and Manage > Pages in the admin control panel, you can see the ID numbers for blog entries and pages. What’s the ID of the page you want to be the home page, and what’s the ID of the post that’s being made the blog page? Can you link to your site?
Hi,
Thanks for replying so soon. The page I want to be the homepage is ID 9:
http://www.synergee.co.uk/synergee/?page_id=9
The page that appears is this one which seems to show all the blogs?
http://www.synergee.co.uk/synergee
Mark, it doesn’t look as though you have permalinks enabled, and they must be in order to use this plugin (with permalinks, the link to your pages would look something like http://www.synergee.co.uk/synergee/home/ instead of http://www.synergee.co.uk/synergee/?page_id=9 ).
Hi,
I selected an alternative permalink structure (other than the default) and it now works fine. Many thanks for your help.
filosofo it seems that, as of now, the download links for .zip and .tar.gz are broken.
update: they work
hi,
i installed the plugin, switched it on but nothing happened. it just working when i change the permalinks style from default to numeric. but then then the whole site is unstyled and my navigation is uncompleted.
any chance to get this runing by using the default permalinks?
thanks
frank
No. With the “default” permalinks WordPress turns off the internal rewrite rules, so the plugin will not work.
thanks for your reply. but the next questions would be, how can i make my site working with “numeric” permalinks? that is probably not really related to you plugin, but maybe you have an answer though.
when you see this
http://www.wds-institut.de/test
and click the navigation, that you will see that all pages link to an subfolder. i was able to fix the css problem, but still all images are missing and my subnavigation is missing too, because of the changed path.
thanks
frank
frank, it sounds like you need to make your image paths absolute instead of relative. Try using the WordPress bloginfo function to make absolute paths.
Thanks for this excellent plugin. I’ve got still the problem, that the feed doesn’t move with the blog into another sub-directory. So I#ve got the blog with help of your plugin in name.tld/blog/ and the feed is still at name.tld/feed/ instead of name.tld/blog/feed/.
How can I fix that?
And another problem: when using the get_posts tag in the new home page it doesn’t list the blog posts. Instead it lists the home page as many times, as there would be blog posts. The site: http://motopaedagogik.eu
It’s German, but where it says “Die letzten Artikel” (the latest articles) on the right side, there it should list the two articles instead of two times “home”.
I would like the homepage to use home.php, and the weblog to reside at http://www.site.com/weblog. However, http://www.site.com/weblog seems to pick up the home.php template instead of the index.php…is that to be expected? Can I make the homepage use home.php, and http://www.site.com/weblog use index.php instead?
Thanks, Susan
I’ve updated the plugin to address Martin Heigl’s feed question and Susan’s home.php problems.
Thanks very much! But with the Changes for Susan in the function set_is_home() it doesn’t work for those, who want to have another template than index.php for their start page, anymore. Therefore I took that function from the “old” version.
Do you have any idea concerning my second problemfrom above?
filosofo,
This morning I downloaded 0.74 and FTP’ed it over 0.73. I’m not sure if that is the correct way to upgrade a plugin. I noted under Plugin Management that it now shows as version 0.74. However, I still see the same problem. You can see the site under development here:
First of all, thank you for the help, and even moreso for the quick help to my question. I should back up and point out that this is my first WP site, so I’m wading through uncharted (for me) waters.
http://dev3.netblazon.com/
The weblog is here:
http://dev3.netblazon.com/weblog/
However, the weblog should show the normal last X number of posts (currently there are only 2 posts, not counting 3 posts in the “calendar events” category that only appear for the Event Calendar plugin). Unfortunately it’s still using the home.php template.
Options for Home-Page Control are “Wordpress Default” and “weblog”.
I didn’t want to use a page for the homepage, because (1) the page editor tries to mangle an empty div tag in the source code, and (2) the homepage uses a slightly modified header.
Thanks!
I should have said that you’ll probably need to re-save the plugin’s settings under Options > Home-Page Control, in order to clear WordPress’s permalink cache.
If both of you do that with version .74 and you’re still having problems, please let me know.
Just tried that, even changed the settings, and then changed them back just to make sure. I still have the same issue. Since this is just a dev site I can grant you access if you want to try it. If you need FTP access I’ll need a few hours to have my host set up a limited account with access to just that part of the filesystem though. Let me know what would help…I’ll grant whatever is needed. Thanks!
PS - just to make sure I triple-checked the plugins page to make sure it said 0.74
Okay, I inadvertently introduced an error into version .74. I’ve put back version .73 until I can fix the mistake in .74 later today. Sorry about that.
Hia Filosofo:-)
Im using .74 of this neato plugin. Im not sure if this is the case, but it seems to me that the plugin ignores my page template. It uses the index.php instead of my edited template for the front-page. If this is the case, is there anything i can to do to make it use the template for my front page?
My permalink strukture is;
/archives/%post_id%
And the Blog Directory is empty…
Regards
Jon Kristian
Whoops. I missed that last post of yours, turning back to .73 fixed my problem. Thanx.
Try version .75–I think I’ve fixed the above-mentioned problems.
No, it still ignores the page template for the front page…
Jon, could you describe in more detail the problem? Are you saying you have a home.php file in your theme that is not being used for the “home” page?
When you say “the Blog Directory is empty,” do you mean the blog directory field under Options > Home-Page Control is empty or just that an actual directory of that name does not exist in the file system? Have you selected a page for Home-Page Page under Options > Home-Page Control, or is it set to “WordPress default”?
It’s a template file for the page called home, which i set to be the front page in your plugin. The problem is, that the template;
It doesn’t get picked up by the plugin, så the page uses the index.php instead of that template.
I hope you understand more now…
.73 works though, i have no problem with it…
Ah, I see. I wasn’t thinking that anyone would be using a template other than home.php. Version 0.77 of the plugin should now choose from the following list the first template file that exists:
home.php
[whatever custom template you've assigned to the home-page page]
page.php
index.php
Yes. Im not sure if this is true, but the reason i made a page and a page template is that i thought making a home.php makes it impossible to edit from inside the wordpress admin area?? The people running the site needs to be able to change content easily, can one do that when using your suggestion?
home.php is just like any other template file (such as page.php, single.php, index.php, and custom files), in that whether it uses editable pages is up to you. It differs from the others in that it is used only when is_home() returns true.
Ohh, I c, thank you for the explaination, im gonna do that
And thank you for a great plugin!
Regards
Jon Kristian
This looks very interesting and exactly what I have been looking for for some time. I will look into in soon… thanks in advance
I too wanted to thank you for the plugin.
I do have one issue. It seems that the WP function is_home() does not work anymore. I was hoping to use the is_home() function to access the new blog URL, but it is always returning false regardless if I am on my new home page or my blog. This function is needed to highlight the tab of the current page.
Here is a code snippet I was trying:
blogs
blogs
Any ideas?
Thanks,
Jim
I forgot my code tags on the last past for my example code. Here that is again…
[php]
< ?php if (is_home()): ?>- blogs
- blogs
< ?php wp_list_pages('..'); ?>
< ?php else : ?>
< ?php wp_list_pages('...'); ?>
< ?php endif; ?>
[/php]
Jim, I can’t reproduce the problem: the code you provided works for me.
Is the address in “WordPress address (URI):” under Options > General the same as your “home” page?
filosofo,
Thanks for the quick reply! The WordPress Address (URI) is set to my site’s default page which is currently a static page that I designated via your plugin.
So I guess the issue is that I need a way to capture that I am on the blog page which is no longer my default or “home” page. I was hoping the “is_home()” function would still do this. If the “is_home” actually captures my new static home page and my blog does not have a page id because it really is not a page, how do I do this?
My goal is to have a site with dynamic tabs where the home page is static and the default Wordpress blog is a different tab.
If I’m understanding you correctly, you want the lists above to appear on your blog’s main page, but not for single posts or pages.
In that case, you should replace “
is_home()” with “!is_single() && !is_page()“I apologize for not being clear.
What I am doing is using tags to create header tabs.
In WP, when you call the wp_list_pages() function, if will create a list of every active page on your site like below:
WP automatically lets the browser know what list item is the current page by giving the current page a class of “page_item current_page_item”. So in the above example, the user clicked on the “About” page. Since the class was updated, we are able to highlight “About” to the user to let him know what the current page is.
By default, the WP home page is not a page at all, so it is not included with the wp_list_pages() function by default. We get around this by using the is_home() function to determine if we are on the home page.
However, with this plugin, our home page is now an actual page in our wp_list_pages() list, but the blog page still is not part of this list. If we can no longer use the is_home() function for our blog page, how do we determine if a user has selected the blog url?
Here is an example where the tabs work because the home page is my blog: http://www.cyfairrealestate.com/
Here is the current site I am working on where the home page is static and the blog is under a different tab. You will notice that I am unable to change the display of the “blogs” after it is selected because I am not sure how to determine that: http://www.praexis.com/wordpress/
You have been more than generous with your help already. I really do appreciate it.
Try what I suggested above, i.e.:
[php]
< ?php if (!is_single() && !is_page()): ?>- blogs
- blogs
< ?php wp_list_pages('..'); ?>
< ?php else : ?>
< ?php wp_list_pages('...'); ?>
< ?php endif; ?>
[/php]
The “blogs” line will show up on the blog main page with the “current_page_item” class.
another Workaround:
if(wp_title(”, false)){
}
else {
//former is_home()-area
}
filosofo! You Rock!!! I obviously should have listened to your suggestion the first time around, but I thought we were talking about different things.
I added the if (!is_single() && !is_page()) code and it worked like a champ!!!
I really do appreciate all of your help! I never would have figured this out my own.
Hi there. I installed your plugin about an hour ago, but I am now having some serious problems getting things to work properly.
I have wordpress installed in a directory called blog, and I followed the instructions here to link the root (www.orangeacid.net) to it. Then i insalled your home page tool and set the directory of the main blog page to ‘blog’ and updated the permalinks accordingly.
However, both the permalinks and the /blog/ directory now give the following error:
[php]
Warning: main(./home/orangeac/public_html/blog/wp-blog-header.php): failed to open stream: No such file or directory in /home/orangeac/public_html/blog/index.php on line 4
Warning: main(./home/orangeac/public_html/blog/wp-blog-header.php): failed to open stream: No such file or directory in /home/orangeac/public_html/blog/index.php on line 4
Fatal error: main(): Failed opening required ‘./home/orangeac/public_html/blog/wp-blog-header.php’ (include_path=’.:/usr/local/lib/php:/usr/lib/php’) in /home/orangeac/public_html/blog/index.php on line 4
[/php]
Do you have any idea how I can get around this? I got it at one point to work so that permalinks displayed the main blog page, but this obviously isn’t what I intended.
Any help would be very much appriciated.
Thanks,
Dan Foy
Dan,
In your blog’s index.php file, you either need to leave off the “.” and go with the absolute path like so:
[php]
require(’/home/orangeac/public_html/blog/wp-blog-header.php’);
[/php]
or you can use the “.” and have a relative path like so:
[php]
require(’./blog/wp-blog-header.php’);
[/php]
But when you try to do both, you’re pointing to a file at
[php]
/home/orangeac/public_html/home/orangeac/public_html/blog/wp-blog-header.php
[/php]
which I bet doesn’t exist.
Thanks man
Perfect plugin
Great customer service too lol. Much reccomended
Installed the plugin but somehow I get the blogs’ sidebar in my new (static) homepage but this sidebar has now disappeared from the blogs´home, where I actually want to have it.
Somebody out there to give me the hint how to change this?
thanks,joost
Joost, there’s probably a conditional statement deciding whether the sidebar appears that looks something like
if (is_home()). Replace that withif (!is_single() && !is_page()).I’ll add my enthusiastic thanks for this plugin to the other ones here. (Had been using a different static-home-page plugin, but it wouldn’t do both home page and blog, too.)
I see the above-mentioned comments about adding a link to “Blog” with the wp_list_pages() function. That gets me to about 95% of the way to what I want to do, except (you knew this was coming, right?) for the order.
I’m using the argument to list pages by menu order, so that I can list pages a certain way:
[Home | About Me | Clips | Resources | Contact]
That means that I’d have to list blog either before the list or (more probably) after the list. What if I want to insert Blog into the list as item #2, like so:
[Home | Blog | About Me | Clips | Resources | Contact ] ?
Is that possible?
Er, in answer to my own question, here’s a way I solved it. I think I’d have to make another set of IF statements for the if it’s home, then sort the classes this way or that way.
[php]
Navigation
< ?php if (!is_single() && !is_page()): ?>- Home
- Blog
- Home
- Blog
< ?php wp_list_pages('exclude=70&sort_column=menu_order&title_li='); ?>
< ?php else : ?>
< ?php wp_list_pages('exclude=70&sort_column=menu_order&title_li='); ?>
< ?php endif; ?>
[/php]
Comments?
Has anybody here been able to get this plugin to work with the Email Notification plugin, as well?
What seems to be the problem, Susan?
With your plugin all on its own, nothing…. But I also tried installing the email notification plugin, and it doesn’t work. (or it works in spotty fashion) I tried disabling all the plugins to see if there was any change with the Email Notification Plugin. Nope. I didn’t go so far as to figure out how to purge the htaccess, as the home and blog still worked as though Home Page Control were still active.
I have no idea if invoking the plugin in the page headers of a file would make something work, or if toying with home page and blog page in a separate directory would interfere with the workings of it. So I thought I’d come by and inquire.
Hi there, I’ve installed this plugin and it rocks. I have just one problem. The rewrited URL’s for the feeds are not working for me. My setup is very simple:
http://url.com/ -> main site
http://url.com/blog -> blog
The rewrited feed are
http://url.com/blog/feed/ (give me a 404)
http://url.com/comments/feed/ (works nicely)
Any idea? 10x
Fred, good point. Links like
http://url.com/blog directory]/feed/rsshave been working, but not just[blog directory]/feed/.I’ve fixed it and uploaded it as version .78.
You can even see it working here on my blog:
http://www.ilfilosofo.com/blog/feed/
After you upload the newer version of the plugin you’ll need to re-save your blog directory under Options > Home Page Control in order to flush WordPress’s rewrite rules cache.
Cool
Thats a nice plugin and I think I will install it right now…
I’m using a custom page template and it’s not recognizing it. I even changed all my pages and edited the default page template - still not working.
home page is http://secret-pal.com and I have it set to point to http://secret-pal.com/front
I’m using WP 2.0.2 and 0.7.8 of the home page control plugin. What do I do to fix it?
Ok,I got it figured out. I took my template for that “page” and put it in my home.php file. Simple, and only stumbled upon the fix by accident. But hey, it’s there and it works.
Great plugin - does exactly what I wanted/needed! Kudos!
Hi there, My host server just recently moved the website to another and what was working perfectly is now not working at all and I am not sure how to fix it. I have a “home” page that is linked to their index page (cdcwestern.ca) and as well I would like the “about page” to be the page people see as soon as they enter the wordpress portion. Finally, now I cannot get the blog page to show. Any thoughts? My pages & catergories seems to be mucked up as well.
Kimberly, my guess is that the WordPress .htaccess file didn’t get moved to your new server.