Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page_on_front logic should happen before first front-end pageload #257

Open
boonebgorges opened this issue Oct 5, 2017 · 0 comments
Open

Comments

@boonebgorges
Copy link
Member

boonebgorges commented Oct 5, 2017

cbox_theme_auto_create_home_page() fires on wp, which means that page_on_front and the homepage-template page template aren't set until the first front-end pageload. This can result in the first pageload being the WP default, which is confusing for the administrator. It also means that the queries run on every WP pageload, which seems wasteful.

It's not currently possible to swap this out directly with a direct call or a different hook, because of the use of is_404().

Ideally, we'd simply call this function during the installation process, eliminating the need to call it again on subsequent pageloads. If that's not possible, perhaps we can check only on admin pages, or when the super admin is logged in.


Edit by r-a-y - See #120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant