ucsc / ucsc-2022

Official WordPress theme for UC Santa Cruz
6 stars 0 forks source link

Using the query loop pagination goes to top of page instead of staying in one spot #149

Closed kanarb closed 1 year ago

kanarb commented 1 year ago

Becca (INC1365539) reports the following issue with the 'news-block-interested-stories' reusable pattern:

We are using the WordPress query loop to show news (blog) post at the bottom of other pages.

For example: https://engineering.wordpress.ucsc.edu/news/livecell-discovery-lab/

If you scroll to the bottom of the page you will see the query loop at the bottom: Under "You May Also Be Interested In"

The built-in feature of pagination within the query loop is being utilized.

Bug: When I click the arrow button to see the next three post the link jumps to the top of the page instead of staying in place. > a new URL populates in the browser window. https://engineering.wordpress.ucsc.edu/news/livecell-discovery-lab/?query-1-page=2

Is there something missing that I need to do so the page won't jump up to the top of the page?

knice commented 1 year ago

This is another issue where the theme isn't the problem. That is how that block works. I think the way to configure it is to not show the pagination links and instead link to your posts page.

knice commented 1 year ago

They might be mistakenly thinking the query block works like a carousel. It doesn't. It works like a page of posts.

kanarb commented 1 year ago

Thanks Rob. I've added that info to the ticket.