Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /**
- * Template Name: One Page
- *
- * @package WordPress
- * @subpackage Oxygen
- * @since Oxygen 1.0
- */
- the_post();
- get_header();
- $fwc = ffContainer::getInstance();
- $postMeta = $fwc->getDataStorageFactory()->createDataStorageWPPostMetas_NamespaceFacade( $post->ID );
- $onePage = $postMeta->getOption( 'onepage');// ( $opt->getOption('oxygen_to', 'oxygen_o'));
- $onePage = unserialize( base64_decode( $onePage ));
- $sectionQuery = ffContainer::getInstance()->getOptionsFactory()->createQuery( $onePage, 'ffComponent_OxygenTheme_OnePageOptions');
- foreach ( $sectionQuery->get('sections') as $query ) {
- $GLOBALS['ff-query'] = $query;
- $variation_type = $query->getVariationType();
- $variation_sections = array(
- 'about',
- 'blockquote',
- 'call-to-action',
- 'contact',
- 'features',
- 'fun-facts',
- 'history',
- 'html',
- 'map',
- 'portfolio',
- 'pricing',
- 'services',
- 'social',
- 'team',
- 'testimonials',
- 'video',
- 'why-we',
- );
- if( in_array($variation_type, $variation_sections) ){
- $customId = $query->get('custom-id');
- if( is_object( $customId ) && $customId->get('enable') ) {
- $newId = $customId->get('new-id');
- $newId = str_replace('#', '', $newId );
- echo '<section class="ff-section-id-holder" id="'.$newId.'">';
- }
- get_template_part( 'templates/onePage/sections/' . $variation_type );
- if( is_object( $customId ) && $customId->get('enable') ) {
- echo '</section>';
- }
- }
- $variation_home = array(
- 'home-menu-only',
- 'home-1',
- 'home-2',
- 'home-3',
- 'home-4',
- 'home-6',
- 'home-7',
- 'home-8',
- 'home-9',
- 'home-10',
- );
- if( in_array($variation_type, $variation_home) ){
- //$query->get('custom-id')//->debug_dump();
- get_template_part( 'templates/onePage/home/' . $variation_type );
- }
- }
- get_footer();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement