How to fix pagination issues with WordPress 5.5 & Elementor post widget

A recent update with WordPress 5.5 caused the pagination in the post widget in elementor to break. 

URLS are displaying /2/ instead of /page/2/

A quick solution is to use Javascript to add the /page into the url.

 

1.Use the html widget

On the page where the problem is occuring, use the html widget.

2. Copy and paste the following code

 

How to debug

If you run into any problems, uncomment the line (remove the double forward slashes).

  // alert("test: "+oldUrl);

You can replace the +oldUrl variable with other variables to see what results appear.

Other solutions

You can find more solutions on github