Warning: strpos(): Empty needle in /home/mobiloud/public_html/help/wp-content/plugins/sg-cachepress/core/Htaccess/Htaccess.php on line 106

Warning: Cannot modify header information - headers already sent by (output started at /home/mobiloud/public_html/help/wp-content/plugins/sg-cachepress/core/Htaccess/Htaccess.php:106) in /home/mobiloud/public_html/help/wp-content/plugins/sg-cachepress/core/Supercacher/Supercacher_Helper.php on line 46
Using the Code Editor – Help & Support
  1. Home
  2. Building a News app
  3. Using the Code Editor

Using the Code Editor

The Editor included in the MobiLoud WordPress plugin allows you to customize your app’s post or page screen with your own CSS/javascript, PHP or HTML code.

Note you’re adding code which will be executed outside “the loop”, therefore you’ll need to refer to the current post ID with the $post->id variable – most WordPress functions and plugins will be accessible with custom code.

Here’s some frequent uses for the editor:

Through the editor and the “head” and “footer” code placements, you can easily load some theme’s or plugin’s CSS or Javascript, which may be necessary for its output to work correctly in the app. You may also load the wp_head(); function to load all the standard javascript and CSS loaded first in your site’s template, as well as the wp_footer(); function for those loaded last.

Here’s the code used to render articles and pages.


<!DOCTYPE html>
<html>
<head dir="ltr">
<link href=
"http://www.yoursite.com/wp-content/plugins/mobiloud-mobile-app-plugin/post/css/styles.css"
media="all" rel="stylesheet">
<link href=
"http://www.yoursite.com/wp-content/plugins/mobiloud-mobile-app-plugin/post/css/_typeplate.css"
media="all" rel="stylesheet">
</head>
<body class="mb_body">
<article class="mb_article">
<p class="mb_post_meta">
<time title="2015-11-20 12:15:29">November 20,
2015</time>
</p>
<div class="mb_post_meta right">
</div>
<div class="mb_clear">
</div>
<h1 class="gamma mb_post_title">An example post</h1>
<p class="mb_post_meta">Author name</p>
<div class="mb_clear">
</div>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Donec
mollis. Quisque convallis libero in sapien pharetra tincidunt. Aliquam
elit ante, malesuada id, tempor eu, gravida id, odio. Maecenas
suscipit, risus et eleifend imperdiet, nisi orci ullamcorper massa, et
adipiscing orci velit quis magna. Praesent sit amet ligula id orci
venenatis auctor. Phasellus porttitor, metus non tincidunt dapibus,
orci pede pretium neque, sit amet adipiscing ipsum lectus et libero.
Aenean bibendum. Curabitur mattis quam id urna. Vivamus dui. Donec
nonummy lacinia lorem. Cras risus arcu, sodales ac, ultrices ac, mollis
quis, justo. Sed a libero. Quisque risus erat, posuere at, tristique
non, lacinia quis, eros.</p>
<p>&nbsp;</p>
</article>
</body>
</html>

Related Articles