Plugin: Static front page
-
This is the official support thread for the static front page plugin:
-
Oh, once I get to build that new site of mine, I will have a lot of fun exploring your plugins. I better bookmark this page right now, because I will probably need it… =)
H??h??… be sure to get the latest version of the theme, too: it currently features no less than four undocumented plugins. ??
Hi there,
Was recommended to ask here or i would not have bothered you “at home”.Im very new to WP, using default Kubrick theme(2col) 1.5 and also a 3colversion.
I cant use htaccess (host issue – it is apache tho) so I use the non-htaccess method of permalinks as per codex.
Im using your “Static Page Plugin” to make a “home” page my opening page. This works well. BUT.
The problem is that when I open WP, the Page List – ie all my static pages are not populated. But when I go open any link or category – the page list is populated then for the rest of the site usage – so the first opening doesnt show my page list.
Not sure what the problem is – It could be the htaccess issue or something Ive left out.
My site is VERY “test” – not public – and Im still at the hair pulling and fiddling stage – but its here :
https://www.im-travel.net/wordpress/
Any ideas gratefully received, thanks.does the problem occur when you activate the plugin too?
Denis, the issue was discussed a bit here:
I was having the same problem so I deactivated the plugin and removed the php file. I still had the problem so I reinstalled (only the php files) WP and it seemed to take care of the issue.
ok. so it would be wp, then
Hi Denis,
Sorry about delay in getting back – dog sitting.
I havent tried to deactivate the plugin.
I dont quite follow what imbng suggests. Can you Denis suggest what to test to exclude WP or any other issue – I dont know here – this is all too new for me to fully understand the technics. Thankssimply deactivate the plugin, and see if the page list displays properly. if the list doesn’t show properly, then it’s very obviously wordpress-related. possibly a config error. or a straightforward bug.
OKayyyy ??
So I uninstalled the Plugin – and the pages display on loadup.
In that case it appears plugin related. Do tyou have a suggestion?
I can follow php but not program.
The other option if its someconflict is to try the other method of static pages suggested in Codex.
Or is this a possible result of using index.php for permalinks?
TAIi noticed you were running 1.5 rather than 1.5.1. could do the trick. there were known issues with permalink-related stuff in 1.5 interacting with the plugin
OK, I will try to do an upgrade (tomorrow) Im absolutly flat just now.
I will get back to you hopefully with good news. ThanksHi Denis,
Good news — the upgrade to 1.5.1 from 1.5 now shows the home page on load AND loads all the pages in the Pages folder.
Whatever it was – is something in 1.5.
Sorry I had to stop last night – it was like nearly 1am and we had been working all day – worth the wait. Thanks for help.The static-front-page is neatly solving a problem I was having with my blog. However, I have found a quirk with its use. I am still investigating, but I am approaching the my limits of understanding of the WordPress code, so I thought I would post my findings so far.
My theme displays pages slightly differently to posts. It uses the is_page() function to determine whether to include some of the features like categories and archives. [There is another way I could have done this which I note in Solution 3, below.]
The is_page function wrongly returns false when visiting the static home page using the root URL. It correctly returns true when visiting the same page using the /home URL. I found that the is_page function returns a cached result calculated by the parse_query function, which in turn actually parses the URL to tell whether it is a page or not. The sem_static_home_link() function fools this parsing code, and thus is_page function returns the wrong value.
I suspect that there are two or maybe three possible solutions.
Solution 1, fix it in the plug-in: Adding another filter to just the right spot may allow the plug-in to wait until after parse_query has run, and then overwrite the cached value used by is_page. Finding that right spot is still a little beyond me – I suspect the option_home filter might be significant, but I am not at all sure.
Solution 2, work around it: Have a separate template for the home page from the other pages/posts, and let it ignore the value of is_page – it should just assume it is a page.
Solution 3, an unlikely, but possible workaround: Rather than having a single template for pages and posts, separate them into two templates. This will only work, if WordPress doesn’t use the exact same is_page function to determine which of the two templates to use. I suspect this solution won’t work.
I hope this is clear!
“The is_page function wrongly returns false when visiting the static home page using the root URL.”
Nope. The is_page function rightly returns false when visiting the static home page using the root URL. Use is_home instead. ??
With the plugin enabled, the permalink to yourblog.com/?p=[home_page_id] will return yourblog.com/ instead. So you’ll be testing is_home() rather than is_page().
- The topic ‘Plugin: Static front page’ is closed to new replies.