layers-wp / layerswp

Layers WordPress theme by Obox
http://www.layerswp.com
Other
23 stars 10 forks source link

the_content hook is not working at all #435

Open oooh-boi opened 5 years ago

oooh-boi commented 5 years ago

I don't know whether this project is maintained anymore... If not - that's a shame coz Elementor's Hello theme is missing some crucial Customizer options. No matter what and as the title says

"the_content" hook can not be used with LayersWP

...as simple as that. I know there's "layers_after_single_content" hook and it does the job, however, it would be nice to respect WordPress rules.

marcperel commented 5 years ago

@oooh-boi have you tried to use the Layers for Elementor theme instead? that should respect the_content() filter.

LayersWP uses widgets to build pages, it's not running through the_content() at all.

We tried to use the_content() before, I think around 2016 but it wasn't reliable enough to remove the auto-formatting in order to render the widgets the way we wanted.

oooh-boi commented 5 years ago

I am using Layers Elementor! On a side note, I've made some tests with Query Monitor and figured out that

add_action( 'wp', 'layers_set_customizer_defaults');

...in the layers-elementor/core/customizer/defaults.php, line #94 prevents the execution of the_contents filter that comes from the third-party plugin.

If I switch to an old version of LayersWP (before Elementor), everything is OK - just like with any other free or commercial WP theme that I have tested the subject plugin with.

Now I just can't figure out what exactly add_action( 'wp', 'layers_set_customizer_defaults'); is supposed to do and why is it there at all? Maybe a little push from your side could help me to figure all out and fix the problem somehow.

Thanks for a speedy response, I thought Layers is kinda dead.