neofunctional
Forum Replies Created
-
Hi @dcooney, thanks for the quick reply — I have added the global variable $post to the top of the repeater template but it doesn’t seem to have fixed the issue loading the next featured image & the second instance of the author image. What’s weird is that when I inspect the element with the featured image, it shows that the image path has been loaded in the css background style but there is a yellow alert icon next to the style that says “invalid property value.” So, the image is being loaded but is being prevented by something else. Any ideas? Thanks again!
Here are my shortcode/template code for reference:
Shortcode/Loop
<?php // The loop if ( have_posts() ) : while (have_posts() ) : the_post(); echo do_shortcode('[ajax_load_more container_type="div" previous_post="true" previous_post_id="'.get_the_ID().'" post_type="post" transition="none"]'); endwhile; endif; ?>Repeater Template:
<div id="single-post" role="main"> <div class="row"> <?php // If a featured image is set, insert into layout and use Interchange // to select the optimal image size per named media query. if ( has_post_thumbnail( $post->ID ) ) : ?> <header id="featured-hero" role="banner" data-interchange="[<?php echo the_post_thumbnail_url('featured-small'); ?>, small], [<?php echo the_post_thumbnail_url('featured-medium'); ?>, medium], [<?php echo the_post_thumbnail_url('featured-large'); ?>, large], [<?php echo the_post_thumbnail_url('featured-xlarge'); ?>, xlarge]" style="background: url('<?php the_post_thumbnail_url( 'featured-xlarge' ); ?> ';"> <div class="herobg"> <h1 id="hero-title"><span class="titlebg"><?php the_title(); ?></span></h1> </div> </header> <?php endif;?> </div> <div class="row topsection"> <div class="columns small-12"> <span class="engagement"> <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo get_permalink();?>" target="_blank" class="facebookshare">Share</a> <a href="http://www.twitter.com/share?url=<?php echo get_permalink();?>&text=<?php echo get_the_title(); ?>" target="_blank" class="twittershare">Tweet</a> <?php echo social_shares() ?> TOTAL SHARES </span> <span class="authorintro"> <a href="#authorbio" title="About the Author"> <span class="show-for-large"> <img src="<?php the_cfc_field('postsponsor', 'author-avatar'); ?>" style="height: 50px; width: 50px; border-radius: 50%; margin-right: 4px;" alt="<?php the_cfc_field('postsponsor', 'author-name'); ?> Portrait" title="<?php the_cfc_field('postsponsor', 'author-name'); ?>"/> </span> <span itemprop="author"> <?php the_cfc_field('postsponsor', 'author-name'); ?> </span> </a> - <?php the_time('n/d/Y') ?> </span> <span class="categories"> <span class="show-for-large">Categories: </span> <?php exclude_post_categories('15598,1,15524,',' '); ?> </span> </div> </div> <div class="row" id="repeaterzone"> <!-- BEGIN Sidebar --> <div class="columns small-12 medium-4 large-3" id="sidebarcontainer"> <div data-sticky-container> <div class="sticky" data-sticky data-options="anchor: sidebarcontainer; marginTop: 3; stickyOn: small;"> <!-- BEGIN MailChimp Signup Form --> <div id="sidebarstick"></div> <div class="mc-signup"> <h3>Get daily news:</h3> <div id="mc_embed_signup"> <form action="subscribe" class="validate" target="_blank" novalidate> <div id="mc_embed_signup_scroll"> <div class="mc-field-group"> <span><input type="email" value="[email protected]" name="EMAIL" class="required email" id="mce-EMAIL"> <input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button"> </span> <p>No spam ever. Just quality news and information.</p> </div> <div class="mc-field-group input-group" style="opacity: 0; max-height: 0px!important; overflow: hidden!important;"> <strong>Newsletter Updates </strong> <ul><li><input type="checkbox" value="1" name="group[9141][1]" id="mce-group[9141]-9141-0" checked><label for="mce-group[9141]-9141-0">Daily Updates: Mon-Thurs</label></li> <li><input type="checkbox" value="2" name="group[9141][2]" id="mce-group[9141]-9141-1" checked><label for="mce-group[9141]-9141-1">Weekly Updates: Friday</label></li> </ul> </div> <div id="mce-responses"> <div class="response" id="mce-error-response" style="display:none"></div> <div class="response" id="mce-success-response" style="display:none"></div> </div> <!-- real people should not fill this in and expect good things - do not remove this or risk form bot signups--> <div style="position: absolute; left: -5000px;"><input type="text" name="b_f4ea340460ffeebbb44b9b162_3eb953d43d" tabindex="-1" value=""></div> </div> </form> </div> </div> <!--END mc_embed_signup--> </div> </div> </div> <!-- END Sidebar --> <!-- BEGIN Body --> <div class="columns small-12 medium-8 large-9"> <?php echo do_shortcode( '[swift-template name="large-ad-zone"]' ); ?> <article id="post-<?php the_ID(); ?>"> <div class="entry-content"> <?php the_content(); ?> <?php edit_post_link( __( 'Edit', 'foundationpress' ), '<span class="edit-link">', '</span>' ); ?> </div> <div class="row sharepost"> <div class="columns small-4"> <a href="https://www.facebook.com/sharer/sharer.php?u=<?php echo get_permalink();?>" target="_blank" class="facebookshare"><i class="fa fa-facebook"></i> Share </a> </div> <div class="columns small-4"> <a href="http://www.twitter.com/share?url=<?php echo get_permalink();?>&text=<?php echo get_the_title(); ?>" target="_blank" class="twittershare"> <i class="fa fa-twitter"></i> Tweet </a> </div> <div class="columns small-4"> <a href="mailto:&subject=<?php echo get_the_title(); ?>&body=<?php echo get_permalink();?>" class="emailshare"><i class="fa fa-envelope"></i> Email </a> </div> </div> <p class="tags"><?php the_tags(); ?></p> <a name="authorbio" style="opacity: 0.0, margin-bottom: 20px;"></a> <?php $sponsorz = get_post_meta($post->ID, 'postsponsor', true); ?> <?php if (!empty($sponsorz)) : ?> <?php else : ?> <div class="sponsorbox"><?php the_cfc_field('postsponsor', 'post-sponsored-by'); ?></div> <?php endif; ?> <?php $authorz = get_post_meta($post->ID, 'postsponsor', 'author-avatar', true); ?> <div class="row authorsection"> <div class="columns small-3 medium-2"> <?php if (!empty($authorz)) : ?> <img src="<?php the_cfc_field('postsponsor', 'author-avatar'); ?>" class="authorpic right" style="margin-bottom: 20px!important; text-align: center; margin-left: auto; margin-right: auto;" alt="<?php the_cfc_field('postsponsor', 'author-name'); ?> Portrait" title="<?php the_cfc_field('postsponsor', 'author-name'); ?>" /> <?php else : ?> <?php endif; ?> </div> <div class="columns small-9 medium-10"> <div itemprop="author"><h4><strong><?php the_cfc_field('postsponsor', 'author-name'); ?> </strong> <?php $websitez = get_post_meta($post->ID, 'postsponsor', true) ?> <?php if(!empty($websitez[0]['author-website'])) : ?> <a href="<?php the_cfc_field('postsponsor', 'author-website'); ?>"><i class="fa fa-link" style="margin-right: 10px;"></i></a> <?php endif; ?> <?php $twitterz = get_post_meta($post->ID, 'postsponsor', true) ?> <?php if(!empty($websitez[0]['author-twitter'])) : ?> <a href="<?php the_cfc_field('postsponsor', 'author-twitter'); ?>"><i class="fa fa-twitter" style="margin-right: 10px;"></i></a> <?php endif; ?> <?php $facebookz = get_post_meta($post->ID, 'postsponsor', true) ?> <?php if(!empty($websitez[0]['author-facebook'])) : ?> <a href="<?php the_cfc_field('postsponsor', 'author-facebook'); ?>"><i class="fa fa-facebook-official" style="margin-right: 10px;"></i></a> <?php endif; ?> <?php $linkedinz = get_post_meta($post->ID, 'postsponsor', true) ?> <?php if(!empty($websitez[0]['author-linkedin'])) : ?> <a href="<?php the_cfc_field('postsponsor', 'author-linkedin'); ?>"><i class="fa fa-linkedin" style="margin-right: 10px;"></i></a> <?php endif; ?> <?php $googlez = get_post_meta($post->ID, 'postsponsor', true) ?> <?php if(!empty($websitez[0]['author-google-plus'])) : ?> <a href="<?php the_cfc_field('postsponsor', 'author-google-plus'); ?>"><i class="fa fa-google-plus" style="margin-right: 10px;"></i></a> <?php endif; ?> <?php $tumblerz = get_post_meta($post->ID, 'postsponsor', true) ?> <?php if(!empty($websitez[0]['author-tumblr'])) : ?> <a href="<?php the_cfc_field('postsponsor', 'author-tumblr'); ?>"><i class="fa fa-tumblr" style="margin-right: 10px;"></i></a> <?php endif; ?> </h4> </div> <div class="authorblurb"><?php the_cfc_field('postsponsor', 'post-author'); ?></div> </div> </div> </article> </div> </div> </div>I seem to be having the same problem – even tried with the cheat sheet CSV’s via plugin website and still, when I select file, the status bar goes from 0 to 100% but nothing happens.