Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Content Editor OnePage theme unable to output style from motopress editor
- This topic has 0 replies, 1 voice, and was last updated 8 years ago by Bonsignore Aurelien.
Viewing 1 post (of 1 total)
- AuthorPosts
- December 23, 2016 at 11:45 am #440387Bonsignore AurelienParticipant
Hi, I’m using motopress and it’s really cool thanks,
I’m trying to implement motopress within a one page theme
All looks fine but the specific styles created inside motopress are not displaying in the frontend.
I get this in my output code :
<style id=”motopress-ce-private-styles” data-posts=”184″ type=”text/css”></style>
But i need style for all page (ids) not only for one.
How can i call a function like getPrivateStylesArr($pageID) inside my theme to output all pages styles ?Thanks a lot for your time
FYI : I’m using this code to display all page
$i = 0; $sort = get_theme_mod('sort', false); foreach ($sort as $section ) { if(is_numeric($section)){ $i++; // check for plugin using plugin name if ( is_plugin_active( 'sitepress-multilingual-cms/sitepress.php' ) ) { //plugin is activated $current_language = apply_filters( 'wpml_current_language', NULL ); $pageTrad = apply_filters( 'wpml_object_id', $section, 'post' ); // print_r('hello world source '.$current_language); // print_r('hello world trad'.$pageTrad); if($pageTrad) { $page = get_post($pageTrad); } else { $page = get_post($section); } } else { $page = get_post($section); } $title = $page->post_title; $content = apply_filters( 'the_content', $page->post_content ); echo '<div class="slide container-fluid" data-anchor="'.get_the_slug($page->ID).'" id="'.$page->ID.'"> <div class="+row flex-s" >'.$content.'</div> </div>'; // print '<style id="motopress-ce-private-styles" data-posts="503" type="text/css"></style>'; // print_r($page); // get_template_part('templates-parts/slide-page'); //USE A MOTOPRESS FUNCTION TO GET STYLES ????? ////getPrivateStylesArr(ID); ?????? //// } else { get_template_part('templates-parts/'.$section); } } ?>
- AuthorPosts
Viewing 1 post (of 1 total)
- You must be logged in to reply to this topic.