You can add your custom Page layouts with action mp_library

function extendTemplates($motopressCELibrary) {
$templateContent = 'paste your shortcodes here'; // example of the content you can find at motopress-content-editor/includes/ce/templates folder

//Add new example of MPCETemplate
$template = new MPCETemplate('my_template', __('Custom Template', 'domain'), $templateContent, 'uploads/my-template.png');

//Add template calling addTemplate method
$motopressCELibrary->addTemplate($template);
}
add_action('mp_library', 'extendTemplates', 11, 1);

MPCETemplate Class

    • id
      (string) – id of new template
      Default: null
    • name
      (string) – name of new template
      Default: null
    • content
      (string) – content of new template
      Default: null
    • icon
      (string) – icon of new template (85x142px). Here you should indicate the path to your icon from /wp_content folder.
      Default: no-template.png

You’ll see your page template while adding new page or post

ce-add-template.jpg

Responses

We want to make our product better, so will be glad to receive your feedback and improve MotoPress specially for you! Leave a message below, make your voice heard!