Skip to content
This repository has been archived by the owner. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Adding support for the post loop widget and 4 custom templates
  • Loading branch information
bcd04001 committed Feb 23, 2018
1 parent 7431df4 commit 14c9a48
Show file tree
Hide file tree
Showing 5 changed files with 143 additions and 0 deletions.
22 changes: 22 additions & 0 deletions content-title-date.php
@@ -0,0 +1,22 @@
<?php
/**
* @package cs
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?>>
<header class="entry-header">

<?php the_title( sprintf( '<h2 class="entry-title-single"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<span class="content-template-date"><?php the_time('F j, Y'); ?></span>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->


<!--<?php edit_post_link( __( 'Edit', 'cs' ), '<span class="edit-link">', '</span>' ); ?>-->
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
32 changes: 32 additions & 0 deletions content-title-excerpt-date-image.php
@@ -0,0 +1,32 @@
<?php
/**
* @package cs
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?>>
<header class="entry-header">
<?php the_post_thumbnail('large') ?>
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<span class="content-template-date"><?php the_time('F j, Y'); ?></span>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->

<div class="entry-content">
<?php the_excerpt(); ?><span class="read_more"><a href="<?php the_permalink(); ?>">Read More &raquo;</a></span>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'cs' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->


<!--<?php edit_post_link( __( 'Edit', 'cs' ), '<span class="edit-link">', '</span>' ); ?>-->
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
32 changes: 32 additions & 0 deletions content-title-excerpt-date.php
@@ -0,0 +1,32 @@
<?php
/**
* @package cs
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?>>
<header class="entry-header">

<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

<?php if ( 'post' == get_post_type() ) : ?>
<div class="entry-meta">
<span class="content-template-date"><?php the_time('F j, Y'); ?></span>
</div><!-- .entry-meta -->
<?php endif; ?>
</header><!-- .entry-header -->

<div class="entry-content">
<?php the_excerpt(); ?><span class="read_more"><a href="<?php the_permalink(); ?>">Read More &raquo;</a></span>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . __( 'Pages:', 'cs' ),
'after' => '</div>',
) );
?>
</div><!-- .entry-content -->


<!--<?php edit_post_link( __( 'Edit', 'cs' ), '<span class="edit-link">', '</span>' ); ?>-->
</footer><!-- .entry-footer -->
</article><!-- #post-## -->
19 changes: 19 additions & 0 deletions content-title.php
@@ -0,0 +1,19 @@
<?php
/**
* @package cs
*/
?>

<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?>>
<header class="entry-header">

<?php the_title( sprintf( '<h2 class="entry-title-single"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

<?php if ( 'post' == get_post_type() ) : ?>

<?php endif; ?>
</header><!-- .entry-header -->


</footer><!-- .entry-footer -->
</article><!-- #post-## -->
38 changes: 38 additions & 0 deletions style.css
Expand Up @@ -2554,4 +2554,42 @@ blockquote {
margin-bottom: 0;
}

/* ================ Post Loop Templates ================ */

.widget_siteorigin-panels-postloop .read_more {
margin-bottom:40px;
display:block;
}

.widget_siteorigin-panels-postloop a.read-more {
display:none;
}

.widget_siteorigin-panels-postloop {
margin-bottom:30px;
}

.widget_siteorigin-panels-postloop .entry-content p:nth-last-of-type(1):after{
content: '...';
}

.widget_siteorigin-panels-postloop .entry-title {
font-size:18px;
line-height: 1.3em;
}

.widget_siteorigin-panels-postloop .entry-title-single {
font-size:18px;
line-height: 1.3em;
margin-bottom: 5px;
}

.widget_siteorigin-panels-postloop .entry-meta {
font-style:italic;
color:#666;
display:block;
margin-bottom:12px;
font-size:13px;
}


0 comments on commit 14c9a48

Please sign in to comment.