The script returns error
-
Hello,
I have some issues with the plugin. The repeater template looks like:
<a class="blog-post" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"> <div class="blog-post-container <?php if (! has_post_thumbnail() ) { echo ' no-img'; } ?>"> <div class="blog-post-image"> <?php if ( has_post_thumbnail() ) { $imagePath = get_the_post_thumbnail_url(get_the_ID(), 'large'); $backgroundcolor = get_post_meta(get_the_ID(), 'background-color-header-hex', true); } ?> <div class="blog-post-image-url" style="background-image: url('<?php echo $imagePath; ?>');"></div> <div class="blog-post-inner" style="background-color: <?php echo ($backgroundcolor[0]=='#'?'':'#').$backgroundcolor ?>"></div> </div> <div class="blog-post-content"> <div class="blog-post-author"> <span class="author-avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), 48 ); ?></span> <span class="author-name">By <?php the_author() ?></span> </div> <div class="blog-post-title"> <h2 class="post-title"><?php the_title(); ?></h2> </div> <div class="blog-post-footer"> <span><?php echo do_shortcode('[rt_reading_time]'); ?>min read</span> <span><?php echo pvc_post_views(); ?></span> </div> </div> </div> </a>
Which breaks the layout – https://ibb.co/S7NmTr2
But when I remove the
<span class="author-avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), 48 ); ?></span>
part it works just fine – https://ibb.co/jV868ZqWhat can be the issue?
Also if I just put the
<span class="author-avatar"><?php echo get_avatar( get_the_author_meta( 'ID' ), 48 ); ?></span>
in the repeater template, it also works. I doubt its due the image.Thanks for the help
The page I need help with: [log in to see the link]
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘The script returns error’ is closed to new replies.