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

Query pagination does not output paged and paged-number body classes #34898

Open
carolinan opened this issue Sep 17, 2021 · 0 comments
Open

Query pagination does not output paged and paged-number body classes #34898

carolinan opened this issue Sep 17, 2021 · 0 comments

Comments

@carolinan
Copy link
Contributor

@carolinan carolinan commented Sep 17, 2021

What problem does this address?

In a PHP based theme the <body> includes the CSS classes paged and paged-number (paged-2) on archive pagination.
With the query and the query pagination block, these body classes are missing.

One use case would be to have a blog with one query for sticky posts, and one for regular posts, with different designs and inner blocks. And then hide the sticky posts on next pages.

I am now solving this by adding the body classes myself if the current url includes `?query-2-page'
But this means I have to change the query in my hack depending on which query id is used for that site or theme.

What is your proposed solution?

Somehow detect the pagination and add the body classes.

Related:
#32531

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

Successfully merging a pull request may close this issue.

None yet
1 participant