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

Issue with "the_content" hook #306

Closed
stevejburge opened this issue Nov 17, 2021 · 8 comments
Closed

Issue with "the_content" hook #306

stevejburge opened this issue Nov 17, 2021 · 8 comments
Assignees

Comments

@stevejburge
Copy link
Member

Some themes render main blocks of their layout (header, content, footer) with "the_content" hook. Using the plugin with them leads to the series box displayed three times (in this particular case) or as many times that the_content hook was called on the page. In that case, the plugin need to be tweaked, so it can render the box content with another hook.

https://wordpress.org/support/topic/best-themes-to-use-organize-series/#post-15077924

@stevejburge stevejburge added this to the 2.7.1: Bug Fixes milestone Nov 17, 2021
@olatechpro
Copy link
Collaborator

@stevejburge, i'll need direction on what needed to be done here on the issues and expected result.

@stevejburge
Copy link
Member Author

@olatechpro This user is pointing out that it may be bad idea for us to rely on the_content because it often loads multiple times.

Maybe we keep using the_content but find a way to only trigger it in the main post area?

@olatechpro
Copy link
Collaborator

olatechpro commented Nov 29, 2021 via email

@olatechpro
Copy link
Collaborator

@stevejburge, while working on series group template, i realised another option to solve this issue is instead of hooking to the_content, we can render the series single in the own template from the plugin with option for users to copy the templete to their theme for customisation or completely opt out for it.

For now, i removed this issue from current milestone but if you give go ahead for this, we can add it back or leave it for now till we decided on best option

@stevejburge
Copy link
Member Author

@olatechpro Sure thing, we can come back to this later

@stevejburge stevejburge added this to the 2.8.0: Design Improvements milestone Dec 3, 2021
@stevejburge
Copy link
Member Author

This is from the Beaver Builder team:

We've looked into it on our end and it doesn't appear it is something we can do on our side.

Your plugin is hooking into the content and it's not something we adjust from within Themer.

If you could unhook your filter in the before and after header/footer hooks, that might work. But our developer believes your code would have to be modified first to make the class accessible via a global variable OR if by adding some sort of filter in the action to check if its enabled or disabled.

Hooks: fl_theme_builder_before_render_footer fl_theme_builder_after_render_footer fl_theme_builder_before_render_header fl_theme_builder_after_render_header

@olatechpro
Copy link
Collaborator

@stevejburge , i've removed our filter in 'fl_theme_builder_before_render_footer' and 'fl_theme_builder_before_render_header' and added it back in 'fl_theme_builder_after_render_footer' and 'fl_theme_builder_after_render_header'.

@olatechpro
Copy link
Collaborator

olatechpro commented Mar 3, 2022

@stevejburge in addition, we introduced a filter apply_filters('pp_series_add_series_content', true) which allow any other plugin developer to determine weather the series content should be display or not and that way, we give chance to other conflicting themes or plugins to fix the issue by returning false for our filter and the series content will be removed.

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

2 participants