Hi, really nice Theme!!!
I would like to know if there’s a way to change the name of Page (ex. Page 1 in Info, Page 2 in About, etc..).
I can change only the first page’s name in index.php, but I can’t do it for the second and for the third.
Thanks!
To resolve this issue please follow my instruction here:
1. Open index.php file in /wp-content/themes/dw-timeline/index.php
2. Change “Page” like the following image
3. Open scripts.php file in /wp-content/themes/dw-timeline/lib/scripts.php
4. Change ‘ Page ‘ as on the screenshot below:
Hope this helps!
Thanks! I really appreciate this trick! But with this method i can change “Page 1, Page 2, Page 3…” in “Example 1, Example 2, Example 3…”.
I would like to know if it’s possible to change “Page 1, Page 2, Page 3…” in “About, Info, Download…”. Maybe I must add some string in index.php for any page that I have in the website and THEN change the name….!!!???
Hi my friend,
Unfortunately, at the moment, DW Timeline does not support to change the “Page 1, Page 2, Page 3…” to ” About, Info, Download…” as you prefer .
Let us know if you stuck somewhere.
Regards,
Hi!
You can do as follows:
1) open the ‘scripts.php’ (/wp-content/themes/dw-timeline/lib/scripts.php file)
look for this line:
wp_localize_script ('dw_timeline_scripts' 'infinitescroll', array (
'page1' => __ ('RELEVANT', 'dw-timeline),
'page2' => __ ('NEWS', 'dw-timeline),
'page3' => __ ('gigs',' dw-timeline),
'page4' => __ ('CONCERT', 'dw-timeline),
'more' => __ ('MORE', 'dw-timeline),
'loading_timline' => $ loading_timline,
'the_end' => __ ('END', 'dw-timeline),
'show_more_button' => $ more_button
));
Where ‘page1’, ‘page2’, etc. they depict the name.
2) open the file ‘scripts.js’ (/wp-content/themes/dw-timeline/assets/js/scripts.js)
Open the file and look for this line:
var separate = $ ('<div data-page = "' + opts.state.currPage + '" class = "timeline-pale dwtl remove full-time-anchor"> <span>' + infinitescroll.page + '' + opts.state.currPage + '</ span> </ div>');
What I did was conditional, depending on the page that takes the value of the array created in scripts.php
for example:
if (opts.state.currPage> = max) {
if (opts.state.currPage == 1) {
var separate = $ ('<div data-page = "' + opts.state.currPage + '" class = "timeline-pale dwtl remove full-time-anchor"> <a href="#"> <span>' infinitescroll.page1 + + '</ span> </a> </ div>');
}
if (opts.state.currPage == 2) {
var separate = $ ('<div data-page = "' + opts.state.currPage + '" class = "timeline-pale dwtl remove full-time-anchor"> <a href="#"> <span>' infinitescroll.page2 + + '</ span> </a> </ div>');
}
if (opts.state.currPage == 3) {
var separate = $ ('<div data-page = "' + opts.state.currPage + '" class = "timeline-pale dwtl remove full-time-anchor"> <span>' + infinitescroll.page3 + '</ span > </ div> ');
}
if (opts.state.currPage == 4) {
var separate = $ ('<div data-page = "' + opts.state.currPage + '" class = "timeline-pale dwtl remove full-time-anchor"> <span>' + infinitescroll.page4 + '</ span > </ div> ');
}
$ (opts.contentSelector) .append (separate);
$ (opts.contentSelector) .append (elems);
}
I hope this helps.
regards
Please login or Register to submit your answer