0 points

Elementor Pagination WordPress 5.5 Fix


dashboard

Tue Sep 01 2020 13:20:18 GMT+0000 (UTC)

Posted by @shm1ckle #javascript

const pages = Array.prototype.slice.call(document.querySelectorAll('a.page-numbers'))
pages.map((page, index) => {
  const oldUrl = page.getAttribute('href')
  const patt = /\/[0-9]{1,2}\//;
  const result = oldUrl.match(patt)
  const result2 = '/page' + result
  const url = oldUrl.replace(result, result2)
  page.setAttribute('href', url)
});
content_copy Copy

Place on the page with Posts pagination.

https://www.reddit.com/r/elementor/comments/i8hyw4/post_widget_pagination_issue/?ref=share&ref_source=embed&utm_content=body&utm_medium=post_embed&utm_name=1dbb53a9260b4f26b08654c3874c09c9&utm_source=embedly&utm_term=i8hyw4