senlin / lean-wp

March 31, 2020: No longer in active development, use at own risk
GNU General Public License v3.0
29 stars 4 forks source link

Lean WP break Reading Settings #10

Closed proweb closed 6 years ago

proweb commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

senlin commented 6 years ago

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 commented 6 years ago

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

senlin commented 6 years ago

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

proweb commented 6 years ago

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

senlin commented 6 years ago

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