示例#1
0
function et_fable_post_class($post_class)
{
    $post_bg_color = ($bg_color = get_post_meta(get_the_ID(), '_et_post_bg_color', true)) && '' !== $bg_color ? $bg_color : '#ffffff';
    $post_bg_layout = ($layout = get_post_meta(get_the_ID(), '_et_post_bg_layout', true)) && '' !== $layout ? $layout : 'dark';
    $post_class[] = 'et-bg-layout-' . $post_bg_layout;
    if (false !== strpos(et_fable_get_background(), 'background-image')) {
        $post_class[] = 'et-background-image';
    } else {
        if ('#ffffff' === $post_bg_color) {
            $post_class[] = 'et-white-bg';
        }
    }
    return $post_class;
}
示例#2
0
<article id="post-<?php 
the_ID();
?>
" <?php 
post_class('entry');
echo et_fable_get_background();
?>
>
	<div class="container clearfix">
		<header class="entry-title">
		<?php 
if (is_single()) {
    ?>
			<h1><?php 
    the_title();
    ?>
</h1>
		<?php 
} else {
    ?>
			<h2>
				<a href="<?php 
    the_permalink();
    ?>
"><?php 
    the_title();
    ?>
</a>
			</h2>
		<?php 
}