Ajax crawable one page theme
-
i’m developing a one page wordpress theme.
The idea is this:
– i load in front-page.php all the pages saved in WordPress with an Ajax request, and then i display them.
– For navigate the pages i added by jQuery a simple scroll animation.Now i have some doubts after i read this: https://developers.google.com/webmasters/ajax-crawling/ in this guide is explained how to create HTML snapshot for pages who load content with AJAX and make them crawable.
I don’t have a singular Ajax request after click a link (because the single pages are already loaded into the front-page.php), i simple scroll the pages to the relative section when the menu item is clicked.
The question is: should i load the pages in another way? How can my theme be crawable if i use this tecnique?
I’m a litte bit confused, thanks for helping me.
The AJAX call:jQuery(document).ready(function(){ jQuery.ajax({ type: 'POST', url: ajaxurl, data: {"action": "load_pages"}, success: function(data){ jQuery('#content-wrapper').prepend(data);
//function called in the ajax_script.js function load_pages(){ $args = array('sort_column'=>'menu_order', 'post_type'=>'page'); $the_pages = get_pages( $args ); foreach ($the_pages as $page) { echo $page->post_content; } die(); }
- The topic ‘Ajax crawable one page theme’ is closed to new replies.