Cover image on themes

This commit is contained in:
dignajar 2016-01-20 23:42:15 -03:00
parent 741e9c3935
commit e07e241527
6 changed files with 48 additions and 6 deletions

View File

@ -29,6 +29,13 @@
</div>
</header>
<!-- Cover Image -->
<?php
if($Post->coverImage()) {
echo '<a href="'.$Post->permalink().'" class="image featured"><img src="'.$Post->coverImage().'" alt="Cover Image"></a>';
}
?>
<!-- Post's content, the first part if has pagebrake -->
<?php echo $Post->content(false) ?>

View File

@ -11,6 +11,13 @@
</div>
</header>
<!-- Cover Image -->
<?php
if($Page->coverImage()) {
echo '<a href="'.$Page->permalink().'" class="image featured"><img src="'.$Page->coverImage().'" alt="Cover Image"></a>';
}
?>
<!-- Post's content, the first part if has pagebrake -->
<?php echo $Page->content() ?>

View File

@ -27,6 +27,13 @@
</div>
</header>
<!-- Cover Image -->
<?php
if($Post->coverImage()) {
echo '<a href="'.$Post->permalink().'" class="image featured"><img src="'.$Post->coverImage().'" alt="Cover Image"></a>';
}
?>
<!-- Post's content, the first part if has pagebrake -->
<?php echo $Post->content() ?>

View File

@ -37,6 +37,11 @@
<!-- Post content -->
<div class="post-content">
<?php
// Cover Image
if($Post->coverImage()) {
echo '<img class="cover-image" src="'.$Post->coverImage().'" alt="Cover Image">';
}
// Call the method with FALSE to get the first part of the post
echo $Post->content(false)
?>

View File

@ -17,7 +17,15 @@
<!-- page content -->
<div class="page-content">
<?php echo $Page->content() ?>
<?php
// Cover Image
if($Page->coverImage()) {
echo '<img class="cover-image" src="'.$Page->coverImage().'" alt="Cover Image">';
}
// Page content
echo $Page->content()
?>
</div>
<!-- Plugins Page Begin -->

View File

@ -34,7 +34,15 @@
<!-- Post content -->
<div class="post-content">
<?php echo $Post->content() ?>
<?php
// Cover Image
if($Post->coverImage()) {
echo '<img class="cover-image" src="'.$Post->coverImage().'" alt="Cover Image">';
}
// Call the method with FALSE to get the first part of the post
echo $Post->content(false)
?>
</div>
<!-- Plugins Post End -->