adding filter for testimonial rotator for the read more link
authorAnthony Talarico <talarico@gaslightmedia.com>
Fri, 17 Aug 2018 14:33:01 +0000 (10:33 -0400)
committerAnthony Talarico <talarico@gaslightmedia.com>
Fri, 17 Aug 2018 14:33:01 +0000 (10:33 -0400)
content-search.php
content-single.php
functions.php
single.php
style.css

index 1ba7228..793f798 100644 (file)
@@ -13,9 +13,6 @@
                <?php the_title( sprintf( '<h1 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h1>' ); ?>
 
                <?php if ( 'post' == get_post_type() ) : ?>
-               <div class="entry-meta">
-                       <?php accesspress_parallax_posted_on(); ?>
-               </div><!-- .entry-meta -->
                <?php endif; ?>
        </header><!-- .entry-header -->
 
index 2ca25c9..e72b95e 100644 (file)
@@ -6,6 +6,8 @@
 $post_date = of_get_option('post_date');
 $post_footer = of_get_option('post_footer');
 $post_date_class = ((!empty($post_date) && $post_date == ' ') || has_post_thumbnail()) ? " no-date" : "";
+global $post;
+$post_type = $post->post_type;
 ?>
 <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <header class="entry-header">
index e3c4b03..490d07f 100644 (file)
@@ -110,8 +110,8 @@ function accesspress_parallax_widgets_init() {
        ) );
 
        register_sidebar( array(
-               'name'          => __( 'Footer One', 'accesspress-parallax' ),
-               'id'            => 'footer-1',
+               'name'          => __( 'Testimonials', 'accesspress-parallax' ),
+               'id'            => 'testimonials-sidebar',
                'description'   => '',
                'before_widget' => '<aside id="%1$s" class="widget %2$s">',
                'after_widget'  => '</aside>',
@@ -348,3 +348,11 @@ function my_nav_wrap() {
     // return the result
     return $wrap;
 }
+function hg_testimonial_rotator_the_excerpt( $html, $limit )
+{   
+    global $post;
+    $link = get_permalink( $post->ID );
+       $more_text = "<a href='$link'> ...Read More </a>";
+       return wp_trim_words(get_the_excerpt(), $limit, $more_text);
+}
+add_filter('testimonial_rotator_the_excerpt', 'hg_testimonial_rotator_the_excerpt', 10, 2);
index 8f8756b..c511794 100644 (file)
@@ -4,7 +4,8 @@
  *
  * @package accesspress_parallax
  */
-
+global $post;
+$post_type = $post->post_type;
 get_header(); ?>
 <div class="mid-content clearfix">
        <div id="primary" class="content-area">
@@ -36,7 +37,9 @@ get_header(); ?>
 
                </main><!-- #main -->
        </div><!-- #primary -->
+<?php if(!$post_type == 'testimonial'){ ?>
+    <?php get_sidebar(); ?>
+<?php } ?>
 
-<?php get_sidebar(); ?>
 </div>
 <?php get_footer();
\ No newline at end of file
index 5a2e471..e111903 100644 (file)
--- a/style.css
+++ b/style.css
@@ -819,16 +819,28 @@ Posts and pages
     padding-left: 0px;
     /* border-bottom: 1px solid #AE8B5F; */
 }
-article.testimonial .entry-header .entry-title{
+.archive article.testimonial .entry-header .entry-title{
     margin-left: 0px;
     margin-bottom: 0px;
     text-align: center;
     background-color: #004037;
     padding: 5px 0;
 }
+.single article.testimonial .byline{
+    display: none;
+}
+.single article.testimonial .entry-header .entry-title{
+    background-color: #004037;
+    color: white;
+    padding: 11px;
+    margin-left: 60px;
+}
 article.testimonial .entry-header .entry-title a{
     color: white;
 }
+.single article.testimonial.hentry{
+    padding-top: 0;
+}
 .entry-header h1.entry-title {
     margin-left: 80px;
 }