예제 #1
0
				<?php 
        if (has_post_thumbnail() && !has_post_format('gallery')) {
            the_post_thumbnail();
        }
        the_content();
        ?>
			</div>

				<?php 
        wp_link_pages();
        ?>


			<div class="post-meta"><p>
				<?php 
        tf2013_post_pubdateinfo();
        if ($options['aktiv-autoren']) {
            tf2013_post_autorinfo();
        }
        tf2013_post_taxonominfo();
        ?>
				</p>
			</div>

			<div><?php 
        edit_post_link(__('Bearbeiten', 'tf2013'), '', '');
        ?>
</div>
		</div>

		<div class="post-nav">
예제 #2
0
    /**
     * Erstellung eines Artikelteasers
     */
    function tf2013_post_teaser($titleup = 1, $showdatebox = 1, $showdateline = 0, $teaserlength = 200, $thumbfallback = 1, $usefloating = 0)
    {
        global $defaultoptions;
        global $options;
        global $post;
        $sizeclass = '';
        $leftbox = '';
        if ($showdatebox == 0) {
            $showdatebox = 1;
        }
        if ($showdatebox != 5) {
            $sizeclass = 'ym-column withthumb';
            // Generate Thumb/Pic or Video first to find out which class we need
            $leftbox .= '<div class="infoimage">';
            $sizeclass = 'ym-column withthumb';
            $thumbnailcode = '';
            $firstpic = '';
            $firstvideo = '';
            if (has_post_thumbnail()) {
                $thumbnailcode = get_the_post_thumbnail($post->ID, 'teaser-thumb');
            }
            $firstpic = get_tf2013_firstpicture();
            $firstvideo = get_tf2013_firstvideo();
            $fallbackimg = '<img src="' . $defaultoptions['src-teaser-thumbnail_default'] . '" alt="">';
            $output = '';
            if ($showdatebox == 1) {
                if (isset($thumbnailcode) && strlen(trim($thumbnailcode)) > 10) {
                    $output = $thumbnailcode;
                } elseif (isset($firstpic) && strlen(trim($firstpic)) > 10) {
                    $output = $firstpic;
                } elseif (isset($firstvideo) && strlen(trim($firstvideo)) > 10) {
                    $output = $firstvideo;
                    $sizeclass = 'ym-column withvideo';
                } else {
                    $output = $fallbackimg;
                }
            } elseif ($showdatebox == 2) {
                if (isset($firstpic) && strlen(trim($firstpic)) > 10) {
                    $output = $firstpic;
                } elseif (isset($thumbnailcode) && strlen(trim($thumbnailcode)) > 10) {
                    $output = $thumbnailcode;
                } elseif (isset($firstvideo) && strlen(trim($firstvideo)) > 10) {
                    $output = $firstvideo;
                    $sizeclass = 'ym-column withvideo';
                } else {
                    $output = $fallbackimg;
                }
            } elseif ($showdatebox == 3) {
                if (isset($firstvideo) && strlen(trim($firstvideo)) > 10) {
                    $output = $firstvideo;
                    $sizeclass = 'ym-column withvideo';
                } elseif (isset($thumbnailcode) && strlen(trim($thumbnailcode)) > 10) {
                    $output = $thumbnailcode;
                } elseif (isset($firstpic) && strlen(trim($firstpic)) > 10) {
                    $output = $firstpic;
                } else {
                    $output = $fallbackimg;
                }
            } elseif ($showdatebox == 4) {
                if (isset($firstvideo) && strlen(trim($firstvideo)) > 10) {
                    $output = $firstvideo;
                    $sizeclass = 'ym-column withvideo';
                } elseif (isset($firstpic) && strlen(trim($firstpic)) > 10) {
                    $output = $firstpic;
                } elseif (isset($thumbnailcode) && strlen(trim($thumbnailcode)) > 10) {
                    $output = $thumbnailcode;
                } else {
                    $output = $fallbackimg;
                }
            } else {
                $output = $fallbackimg;
            }
            $leftbox .= $output;
            $leftbox .= '</div>';
        } else {
            $sizeclass = 'ym-column';
        }
        ?>
	<div <?php 
        post_class($sizeclass);
        ?>
 id="post-<?php 
        the_ID();
        ?>
" >

		<?php 
        if ($titleup == 1) {
            ?>
			<div class="post-title ym-cbox"><h2>
					<a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="<?php 
            the_title_attribute('echo=0');
            ?>
">
						<?php 
            the_title();
            ?>
					</a>
				</h2></div>
			<div class="ym-column">
				<?php 
        }
        /*
         * 1 = Thumbnail (or: first picture, first video, fallback picture),
         * 2 = First picture (or: thumbnail, first video, fallback picture),
         * 3 = First video (or: thumbnail, first picture, fallback picture),
         * 4 = First video (or: first picture, thumbnail, fallback picture),
         * 5 = Nothing */
        if ($showdatebox < 5) {
            echo '<div class="post-info ym-col1"><div class="ym-cbox">';
            echo $leftbox;
            echo '</div></div>';
            echo '<div class="post-entry ym-col3">';
            echo '<div class="ym-cbox';
            if ($usefloating == 0) {
                echo ' ym-clearfix';
            }
            echo '">';
        } else {
            echo '<div class="post-entry ym-cbox">';
        }
        if ($titleup == 0) {
            ?>
				<div class="post-title"><h2>
						<a href="<?php 
            the_permalink();
            ?>
" rel="bookmark" title="<?php 
            the_title_attribute('echo=0');
            ?>
">
							<?php 
            the_title();
            ?>
						</a>
					</h2></div>
			<?php 
        }
        if ($showdateline == 1) {
            ?>
				<p class="pubdateinfo"><?php 
            tf2013_post_pubdateinfo(0);
            ?>
</p>
			<?php 
        }
        echo get_tf2013_custom_excerpt($teaserlength);
        ?>
		<?php 
        if ($showdatebox < 5) {
            ?>
			</div>
			<div class="ym-ie-clearing">&nbsp;</div>
	<?php 
        }
        ?>
	</div>

	<?php 
        if ($titleup == 1) {
            echo '</div>';
        }
        echo '</div>';
    }