Integrating with Wordpress¶
Front page¶
To correctly convert the front page it must follow the default theme structure( Wordpress 3.1).
Post page¶
For content there should be element with class=”entry-content”. For the post content there should be element with id=”comments”.
The content inside those tags are used as-is.
- Test 1
- Test 2
<body>
<script type="text/javascript" src="http://cdn.mobilizejs.com/releases/0.1/js/mobilize.core.debug.js"></script>
<!-- Your custom extender goes here -->
<script type="text/javascript" src="http://localhost/mobilize.mysite.js"></script>
mobilize.extends(mobilize, {
initPlugins : function() {
mobilize.extend(mobilize.cdnOptions, {
// Identifier tag for this extender
// This is used for error reporting, etc.
bundleName : "mobilize.yoursite",
// CSS files to load *after* mobilization
cssBundles : ["./mobilize.yoursite.css"],
// CSS files to load *after* mobilization
javascriptBundles : ["./mobilize.yoursite.css"],
// HTML barebone tmeplate for the mobile site
template : "templates/wordpress.html"
});
},
constructBody : function() {
// Perform transformation here
}
});