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

Lean WP break Reading Settings #10

Closed
proweb opened this issue Nov 15, 2017 · 7 comments
Closed

Lean WP break Reading Settings #10

proweb opened this issue Nov 15, 2017 · 7 comments

Comments

@proweb
Copy link

proweb commented Nov 15, 2017

Hello thanks for such usefull plugin
But I have small problem when it active.

If Lean WP active wordpress "Reading Settings" always set Front page displays to Static page


Screen record

@senlin
Copy link
Owner

senlin commented Nov 15, 2017

Hi Sergey, thanks for your message and glad to hear you like Lean WP.

The plugin indeed sets the Front page displays setting to Static page.

In the plugin docs you can read more about that.

Hope that helps.

Piet

@proweb
Copy link
Author

proweb commented Nov 15, 2017

So @senlin it's feature not bug???

@senlin
Copy link
Owner

senlin commented Nov 15, 2017

Certainly not a bug, as per the earlier referred to docs:

Most company websites come with a dedicated home page, instead of showing the latest Post like blogs do. Lean WP automatically sets the Front page displays-setting (under Settings > Reading) to A static page. The user can then select the correct page from the drop down.

@proweb
Copy link
Author

proweb commented Nov 16, 2017

ОК. It's your plugin, your vision.

@senlin
Copy link
Owner

senlin commented Nov 16, 2017

You often make company sites which show the latest posts as homepage?

@proweb
Copy link
Author

proweb commented Nov 16, 2017

I want to use plugin for cleanup all garbage on my blog, but this "feature" made it not usable

senlin pushed a commit that referenced this issue Nov 17, 2017
senlin pushed a commit that referenced this issue Nov 17, 2017
* November 17, 2017
* Makes `show_page_on_front()` function pluggable so it can be
overridden in (child-)theme or other plugin; addresses [issue
#10](#10)
@senlin
Copy link
Owner

senlin commented Nov 17, 2017

Interesting that you would want to use the plugin on a blog, whereas I built it with company sites in mind.

Tell you what, I have just released a version where you can add a filter to the functions file of your (child-)theme that overrides the filter and function in the plugin, like so:

/**
 * override Lean WP filter to show latest posts on homepage
 */
add_filter( 'pre_option_show_on_front', 'show_page_on_front' );

function show_page_on_front() {
    return 'posts';
}

Hope that helps

@senlin senlin closed this as completed Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants