Thread Starter
Joelle
(@joelle)
I made a discovery today! I have a client who has her books (including ‘future posts’) set up as pages. It took me about 20 minutes to realize the reason those were still showing 404 is because they aren’t using single.php. DUH, right? (You’d think I haven’t been doing this for… *coughcough* years.)
It was an easy adjustment in my functions file, but if you ever decide to include a settings page and want to include that option it was just:
if(is_single() || is_page() && $wp_query->post_count == 0)
Not that you need to – that’s a fairly unorthodox usage. 😀 But I figured I’d share anyway.
Thread Starter
Joelle
(@joelle)
Yup! I mean, it probably won’t apply to most people, but I guess to some it might. 🙂 If it were an option to be ticked (posts, pages, cpt) then people could allow that function on those specific things instead of only on single posts. They could do all or just one or two.
But that’s literally like a “if you have nothing else to do or even want to” kind of thing.
problem is, i don’t have a settings page. maybe i will in a near future, who knows?
so, changing the behaviour of future pages, while the plugin is related to posts only, without a proper option to be set by the user, i think it’s not a good idea. some people may not like that at all. besides, i don’t believe there’s much people doing future pages. it doesn’t make much sense, does it?
i will leave the line of code inside the function (next version), but on a commented state. if people realy need it, will be just a matter of swapping it.
Thread Starter
Joelle
(@joelle)
No, I totally agree. I wasn’t suggesting you do it now. but if you ever do add a settings page, you might consider it. 🙂