Using the Code Editor

Watch on YouTube here

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>
<head dir=”ltr”>
<link href=
media=”all” rel=”stylesheet”>
<link href=
media=”all” rel=”stylesheet”>
<body class=”mb_body”>
<article class=”mb_article”>
<p class=”mb_post_meta”>
<time title=”2015-11-20 12:15:29″>November 20,
<div class=”mb_post_meta right”>
<div class=”mb_clear”>
<h1 class=”gamma mb_post_title”>An example post</h1>
<p class=”mb_post_meta”>Author name</p>
<div class=”mb_clear”>
<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>

Related Articles