Exemple #1
0
<?php

/**
 * The single post loop Default template
 **/
if (have_posts()) {
    the_post();
    $td_mod_single = new td_module_single($post);
    ?>

    <article id="post-<?php 
    echo $td_mod_single->post->ID;
    ?>
" class="<?php 
    echo join(' ', get_post_class());
    ?>
" <?php 
    echo $td_mod_single->get_item_scope();
    ?>
>
        <div class="td-post-header">

            <?php 
    echo $td_mod_single->get_category();
    ?>

            <header class="td-post-title">
                <?php 
    echo $td_mod_single->get_title();
    ?>
<?php

// Template 2 - post-final-2.psd - normal image + full title
//get the global sidebar position from td_single_template_vars.php
locate_template('includes/wp_booster/td_single_template_vars.php', true);
get_header();
global $loop_sidebar_position, $td_sidebar_position, $post;
$td_mod_single = new td_module_single($post);
?>
<div class="td-main-content-wrap">

    <div class="td-container td-post-template-2">
        <article id="post-<?php 
echo $td_mod_single->post->ID;
?>
" class="<?php 
echo join(' ', get_post_class());
?>
" <?php 
echo $td_mod_single->get_item_scope();
?>
>
            <div class="td-pb-row">
                <div class="td-pb-span12">
                    <div class="td-post-header">
                        <div class="td-crumb-container"><?php 
echo td_page_generator::get_single_breadcrumbs($td_mod_single->title);
?>
</div>

                        <?php 
Exemple #3
0
<?php

/**
 * single Post template 12
 **/
if (have_posts()) {
    the_post();
    $td_mod_single = new td_module_single($post);
    ?>




        <div class="td-post-content">
            <?php 
    echo $td_mod_single->get_content();
    ?>
        </div>


        <footer>
            <?php 
    echo $td_mod_single->get_post_pagination();
    ?>
            <?php 
    echo $td_mod_single->get_review();
    ?>

            <div class="td-post-source-tags">
                <?php 
    echo $td_mod_single->get_source_and_via();
Exemple #4
0
<?php

/**
 * single Post template 5
 **/
if (have_posts()) {
    the_post();
    $td_mod_single = new td_module_single($post);
    ?>

    <article id="post-<?php 
    echo $td_mod_single->post->ID;
    ?>
" class="<?php 
    echo join(' ', get_post_class());
    ?>
" <?php 
    echo $td_mod_single->get_item_scope();
    ?>
>
        <div class="td-post-header">

            <?php 
    echo $td_mod_single->get_category();
    ?>

            <header class="td-post-title">
                <?php 
    echo $td_mod_single->get_title();
    ?>
<?php

// Template 9  -post-final-9.psd
//get the global sidebar position from single.php
global $loop_sidebar_position;
// sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
$td_sidebar_position = '';
if ($loop_sidebar_position == 'sidebar_left') {
    $td_sidebar_position = 'td-sidebar-left';
}
$td_mod_single = new td_module_single($post);
?>
<article id="post-<?php 
echo $td_mod_single->post->ID;
?>
" class="<?php 
echo join(' ', get_post_class('td-post-template-9'));
?>
" <?php 
echo $td_mod_single->get_item_scope();
?>
>
    <div class="td-container">
        <div class="td-crumb-container"><?php 
echo td_page_generator::get_single_breadcrumbs($td_mod_single->title);
?>
</div>
        <div class="td-post-featured-video">
            <?php 
// override the default featured image by the templates (single.php and home.php/index.php - blog loop)
if (!empty(td_global::$load_featured_img_from_template)) {
<?php

// Template 11  -post-final-11.psd
//get the global sidebar position from single.php
global $loop_sidebar_position;
// sidebar position used to align the breadcrumb on sidebar left + sidebar first on mobile issue
$td_sidebar_position = '';
if ($loop_sidebar_position == 'sidebar_left') {
    $td_sidebar_position = 'td-sidebar-left';
}
$td_mod_single = new td_module_single($post);
?>
<article id="post-<?php 
echo $td_mod_single->post->ID;
?>
" class="<?php 
echo join(' ', get_post_class('td-post-template-11'));
?>
" <?php 
echo $td_mod_single->get_item_scope();
?>
>
    <div class="td-video-template-bg">
        <div class="td-container">
            <div class="td-pb-row">
                <div class="td-pb-span12 td-crumb-container"><?php 
echo td_page_generator::get_single_breadcrumbs($td_mod_single->title);
?>
</div>

                <div class="td-pb-span4 td-post-header">
 function __construct($post)
 {
     //run the parrent constructor
     parent::__construct($post);
 }
    function inner($posts, $td_column_number = '')
    {
        ob_start();
        if (!empty($posts[0])) {
            $post = $posts[0];
            //we get only one post
            // $td_post_featured_image = td_util::get_featured_image_src($post->ID, 'full');
            $td_mod_single = new td_module_single($post);
            //make the js template
            ?>

            <!-- add class to body, no jQuery and inline -->
            <?php 
            ob_start();
            ?>
            <script>
                document.body.className+=' td-boxed-layout single_template_8 homepage-post ';
            </script>
            <?php 
            echo ob_get_clean();
            ?>



            <script type="text/template" id="<?php 
            echo $this->block_uid . '_tmpl';
            ?>
">

                <article id="post-<?php 
            echo $td_mod_single->post->ID;
            ?>
" class="<?php 
            echo join(' ', get_post_class('post td-post-template-8'));
            ?>
" <?php 
            echo $td_mod_single->get_item_scope();
            ?>
>
                    <div class="td-post-header td-image-gradient-style8">
                        <div class="td-crumb-container"><?php 
            echo td_page_generator::get_single_breadcrumbs($td_mod_single->title);
            ?>
</div>

                        <div class="td-post-header-holder">

                            <header class="td-post-title">

                                <?php 
            echo $td_mod_single->get_category();
            ?>
                                <?php 
            echo $td_mod_single->get_title();
            ?>


                                <?php 
            if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) {
                ?>
                                    <p class="td-post-sub-title"><?php 
                echo $td_mod_single->td_post_theme_settings['td_subtitle'];
                ?>
</p>
                                <?php 
            }
            ?>

                                <div class="td-module-meta-info">
                                    <?php 
            echo $td_mod_single->get_author();
            ?>
                                    <?php 
            echo $td_mod_single->get_date(false);
            ?>
                                    <?php 
            echo $td_mod_single->get_views();
            ?>
                                    <?php 
            echo $td_mod_single->get_comments();
            ?>
                                </div>

                            </header>
                        </div>
                    </div>
                </article>

            </script>






            <?php 
            $td_post_featured_image = td_util::get_featured_image_src($post->ID, 'full');
            ob_start();
            ?>
            <script>
                // add the template
                jQuery( '.td-header-wrap' ).after( jQuery( '#<?php 
            echo $this->block_uid;
            ?>
_tmpl' ).html() );

                // make the wrapper and the image -> and add the image inside
                var td_homepage_full_bg_image_wrapper = jQuery( '<div class="backstretch"></div>' );
                var td_homepage_full_bg_image = jQuery( '<img class="td-backstretch not-parallax" src="<?php 
            echo $td_post_featured_image;
            ?>
"/>' );
                td_homepage_full_bg_image_wrapper.append(td_homepage_full_bg_image);

                // add to body
                jQuery('body').prepend( td_homepage_full_bg_image_wrapper );

                // run the backstracher
                var td_backstr_item = new tdBackstr.item();
                td_backstr_item.wrapper_image_jquery_obj = td_homepage_full_bg_image_wrapper;
                td_backstr_item.image_jquery_obj = td_homepage_full_bg_image;
                tdBackstr.add_item( td_backstr_item );

            </script>
            <?php 
            $buffer = ob_get_clean();
            $js = "\n" . td_util::remove_script_tag($buffer);
            td_js_buffer::add_to_footer($js);
        }
        return ob_get_clean();
    }
    function inner($posts, $td_column_number = '')
    {
        ob_start();
        if (!empty($posts[0])) {
            $post = $posts[0];
            //we get only one post
            $td_post_featured_image = td_util::get_featured_image_src($post->ID, 'full');
            $td_mod_single = new td_module_single($post);
            //make the js template
            ?>
            <script type="text/template" id="<?php 
            echo $this->block_uid . '_tmpl';
            ?>
">

                <article id="post-<?php 
            echo $td_mod_single->post->ID;
            ?>
"
                         class="<?php 
            echo join(' ', get_post_class('td-post-template-6'));
            ?>
" <?php 
            echo $td_mod_single->get_item_scope();
            ?>
>
                    <div class="template6-header">
                        <div class="td-post-header td-container" id="td_parallax_header_6">
                            <header class="td-pb-padding-side">
                                <?php 
            echo $td_mod_single->get_category();
            ?>
                                <?php 
            echo $td_mod_single->get_title();
            ?>
                                <?php 
            if (!empty($td_mod_single->td_post_theme_settings['td_subtitle'])) {
                ?>
                                    <p class="td-post-sub-title"><?php 
                echo $td_mod_single->td_post_theme_settings['td_subtitle'];
                ?>
</p>
                                <?php 
            }
            ?>
                                <div class="meta-info">
                                    <?php 
            echo $td_mod_single->get_author();
            ?>
                                    <?php 
            echo $td_mod_single->get_date(false);
            ?>
                                    <?php 
            echo $td_mod_single->get_views();
            ?>
                                    <?php 
            echo $td_mod_single->get_comments();
            ?>
                                </div>
                                <div class="td-read-down"><a href="#"><i class="td-icon-read-down"></i></a></div>
                            </header>
                        </div>
                    </div>
                </article>

            </script>


            <?php 
            td_js_buffer::add_to_footer("jQuery('body').addClass('single_template_6');" . "\r\n" . "jQuery('body').prepend(jQuery('#" . $this->block_uid . "_tmpl').html());" . "\r\n" . 'jQuery(\'body\').prepend(\'<div class="td-full-screen-header-image-wrap"><div id="td-full-screen-header-image" class="td-image-gradient"></div></div>\');' . "\r\n" . 'jQuery().ready(function() {' . "\r\n" . "jQuery('#td-full-screen-header-image').backstretch('" . $td_post_featured_image . "', {fade:1200, centeredY:false});" . "\r\n" . 'td_post_template_6_title();' . "\r\n" . "jQuery('.td-read-down a').click(function(event){" . "\r\n" . "event.preventDefault();" . "\r\n" . "td_util.scroll_to_position(jQuery('.td-full-screen-header-image-wrap').height(), 1200);" . "\r\n" . "});" . "\r\n" . '});');
        }
        return ob_get_clean();
    }