New Front EN › Support Forums › Ikebana Theme Support › Change Pagination to Endless Scrolling
- This topic has 19 replies, 2 voices, and was last updated 11 years, 1 month ago by chao.
-
AuthorPosts
-
September 25, 2013 at 2:59 am #1734chaoParticipant
Hi, can I change the pagination style at the portfolio page (Page 1, 2, 3, etc.) with a Read More Button – endless scrolling style?
If yes, just point me to the file that is needed to edit, and some insight in case I break the theme :D
September 26, 2013 at 12:56 am #1736satoriKeymasterHey Chao,
Ikebana has not been explicitly tested with the infinite scroll so far, but the theme’s portfolio masonry layout is based on Isotope, which can be combined with Paul Irish’s Infinite Scroll plugin. Thus with some customizations and changes to the theme’s code it should be possible to use the infinite scroll function; for the sake of clarity, please note that such changes are not covered by the theme’s support guarantee on ThemeForest because they are classified as theme customization. To implement the infinite scroll, you will need to integrate the plugin itself, as well as most probably edit the theme’s “header-functions.php” and “page_portfolio.php” template files.
Should you have more questions, do not hesitate to ask!
Sincerely,
Andrew / Satori StudioSeptember 28, 2013 at 1:45 pm #1747chaoParticipantYeah, I get it. However, it seems paginate_links() function doesn’t work on page with portfolio template, which means the said plugin can’t get the data from portfolio post type.
Are there any workaround this?
- This reply was modified 11 years, 1 month ago by chao.
September 28, 2013 at 2:04 pm #1749chaoParticipantAlso, how can I style the position of the generated portfolio-item? They always have width: 100% or something after using endless plugin. Are there any hints? etc.
There is an error though
TypeError: $(…).masonry is not a function @ /wp-content/plugins/infinite-scroll/behaviors/masonry-isotope.js?ver=2.6.1:18
I tested it with WP default, it was fine
- This reply was modified 11 years, 1 month ago by chao.
September 28, 2013 at 3:08 pm #1751chaoParticipantOk, I found out that the error is the main problem, and also the plugin jquery files are not included in the portfolio template static page.
How can I fix both of them?
September 28, 2013 at 3:52 pm #1752chaoParticipantSorry, I fixed the error: “the plugin jquery files are not included in the portfolio template static page. ” by modifying the plugin file
Now, there is only one problem which I have no idea how to fix it
TypeError: $(…).masonry is not a function @ /wp-content/plugins/infinite-scroll/behaviors/masonry-isotope.js?ver=2.6.1:18
And also
“how can I style the position of the generated portfolio-item? They always have width: 100% or something after using endless plugin. Are there any hints? etc.”
- This reply was modified 11 years, 1 month ago by chao.
October 1, 2013 at 6:18 pm #1757satoriKeymasterHey Chao,
I apologize for the delay in my reply!
The WordPress plugin based on the Infinite Scroll will not function with Ikebana’s portfolio layout because the latter is based on the Isotope masonry layout and the former only envisages simple multi-page blog-type pages. The Isotope uses a special method called “appended” to add new items, which is not included into the WordPress plugin for Infinite Scroll.
You would need to use the plain jQuery version of the Infinite Scroll with Ikebana’s portfolio page.
Anyhow, I will implement the effect on your website, since I was planning to add it to the theme anyway. Please send me your ftp account login and password – I’ve made a typo in the php code while altering the needed files on your website, now it can only be fixed by re-uploading the correct files via ftp (you can do it yourself if you wish – just upload the file from this archive into the “wp-content/themes/Ikebana/” directory on your install.
Sincerely,
Andrew / Satori StudioOctober 2, 2013 at 9:58 am #1764chaoParticipantHi again, I have fixed the function file with your version.
So what is the next step? Do I need to implement plain Jquery of the scroll into the page myself or just leave it there?
I sent you the ftp details anyway. It’s in the support mail
- This reply was modified 11 years, 1 month ago by chao.
October 2, 2013 at 9:28 pm #1772satoriKeymasterI’ve inserted the code into the parent theme’s header-functions.php instead of the child’s and it works now ;)
For the record, in total during the setup of the Infinite Scroll I’ve made changes to the following files:
– added folder /infinitescroll/ to the parent theme’s /scripts/ folder
– modified parent’s “functions.php”
– modified parent’s “header-functions.php”
– modified child’s “page_portfolio.php”Important notice: the plugin does not take into account sticky posts in its architecture, thus in case you have sticky posts, they will keep re-appearing at the very bottom of the page once you scroll all the way down; it is therefore advised not to have sticky portfolio projects while the plugin is active.
Sincerely,
Andrew / Satori StudioOctober 3, 2013 at 6:04 am #1775chaoParticipantAll right, thank you :). This feature is cool and you should add it into your theme btw. Next Page is so yesterday.
Wait, there is a problem. I can’t click to access the project posts that are rendered by scrolling. Is there anything wrong
- This reply was modified 11 years, 1 month ago by chao.
-
AuthorPosts
- You must be logged in to reply to this topic.