yosefcz
asked 10 years ago

Could you add page number to URL with support for back history?
See http://twentythirteendemo.wordpress.com
This template automatic add page number after scroll.
http://twentythirteendemo.wordpress.com/page/2/

1 Answers
Wilfred
answered 10 years ago

Hi Yosefcz,
To resolve this issue please follow my instruction here:
1. Open scripts.php file in /wp-content/themes/dw-timeline-pro/lib/scripts.php
2. Replace the following code – line 55

'gallery_lightbox' => $gallery_lightbox

with

'gallery_lightbox' => $gallery_lightbox,
'site_url' => site_url()



3. Open scripts.js file in /wp-content/themes/dw-timeline-pro/assets/js/scripts.js 4. Add the following code to line 402

if (page != 1) {
window.history.pushState( '', 'title', dwtl.site_url + '/page/' + page );
} else {
window.history.pushState( '', 'title', dwtl.site_url );
}

   
Hope this helps!

Powered by DW Question & Answer Pro