Plugin Author
malihu
(@malihu)
Your “HOME” link has http://dewebstek.be/ontwerpenwp/ (not http://dewebstek.be/ontwerpenwp/menu/#section_menu). None of your 3 links have a hash (#) in their href attribute and none has rel attribute m_PageScroll2id. All 3 of your links point to different pages (./, /menu/ and /contact/).
The plugin is activated but it’s not applied on any of your links.
Thread Starter
isoweb
(@isoweb)
That is my problem, I’ve inserted the adjusted “url” and the “XFN” in the menu structure but nothing is working… (I made a mistake in the question above , I meant MENU instead of HOME)
Please check:”http://www.dewebstek.be/afbeeldingen/scrollpage.jpg”
Thanks!
Plugin Author
malihu
(@malihu)
Well, the screenshot you posted does not match your menu links.
My guess is that the menu you see in http://dewebstek.be/ontwerpenwp/ is not a custom menu but a menu that generates your blog pages. To test this, change a label in you menu and see if it’s changed on the front-end.
Thread Starter
isoweb
(@isoweb)
Now it is, but still not working…
Thanks!
Plugin Author
malihu
(@malihu)
Your links should be like: http://dewebstek.be/ontwerpenwp/#section_home and not http://www.dewebstek.be/ontwerpenwp/home#section_home/.
At the moment, according to the way your site pages are set, your 3 links should be:
http://dewebstek.be/ontwerpenwp/#section_home
http://dewebstek.be/ontwerpenwp/menu/#section_menu
http://dewebstek.be/ontwerpenwp/contact/#section_contact
If you include all your pages in one page (e.g. your site index), your links should be:
http://dewebstek.be/ontwerpenwp/#section_home
http://dewebstek.be/ontwerpenwp/#section_menu
http://dewebstek.be/ontwerpenwp/#section_contact
Thread Starter
isoweb
(@isoweb)
I’ve inserted the links as you described above…
But it doesn’ work correctly.
Sorry
Plugin Author
malihu
(@malihu)
What do you mean “not correctly”? Everything seems to work as it should.
Each of your links point to a different page/URL, so when you click them, they go to that URL and then scroll the page to the target section.
If you place your links and sections on a single page/URL, each time you click a link in your menu, it’ll just scroll the page to the associated target section.
Thread Starter
isoweb
(@isoweb)
So if I want the scroll effect between pages, I need to make a single page website?
If I click now on a menu-item the page loads in but doesn’t “scroll in”.
Plugin Author
malihu
(@malihu)
No, the page does scroll when it loads!
I think you need to resize your browser window in order to see page scrolling (make your window height short enough to see browser’s scrollbar on the right).
Thread Starter
isoweb
(@isoweb)
Plugin Author
malihu
(@malihu)
Then you’ll need to include all your pages content in a single page (e.g. in your index in http://dewebstek.be/ontwerpenwp/) and have your links set as:
http://dewebstek.be/ontwerpenwp/#section_home
http://dewebstek.be/ontwerpenwp/#section_menu
http://dewebstek.be/ontwerpenwp/#section_contact
The http://manos.malihu.gr/repository/page-scroll-to-id/demo/demo.html is exactly that: a single-page site example.
Thread Starter
isoweb
(@isoweb)
Thank you for your answer.
I will have to check out how to include all the pages content in a single one. I haven’t done this yet.
Can you provide me a link of a good tutorial ?
Thanks for your support!
Plugin Author
malihu
(@malihu)
You can do something like this in your front-page/index:
<?php
$inc_post_id = 7 //post/page id to include
$inc_post = get_post($inc_post_id);
//post/page title
$inc_title = $inc_post->post_title;
//post/page content
$inc_content = apply_filters('the_content', $inc_post->post_content);
//output
echo '<h2>'.$inc_title.'</h2>';
echo '<div>'.$inc_content.'</div>';
?>
Searching Google for something like “include page content in wordpress template” will give you plenty results π
Thread Starter
isoweb
(@isoweb)
Hello,
I’ve found some code. Css is not wright yet ! But in some browsers the whole page first loads and then scrolls to the selected section.What can be done to prevent this?
In IE 11 I don’t see the scroll effect…