5AMWE5T
Forum Replies Created
-
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Related posts not showing upThe error fixed itself.
I just installed the plugin and didn’t change any settings or methods. For some reason the two plugins just don’t work together.
I discovered that is was WP Retina 2x that was messing up infinite scroll for some reason. I’m not sure why that plugin was causing issues, but thanks for the help!
I just deactivated all plugins except for Jetpack and now it is working. Thanks for walking me through this! I will have to check later to see which plugin was causing the error and I will post which one it is when I find out.
I just switched the theme to Twenty Sixteen, and it looks like it is working the same as the other theme.
How do I send you a copy of the theme? I clicked your link but I don’t know how to attach files with that contact form.
I just replaced the first line like you said and the posts still arent loading, but now every post looks like a “first” post based on the template.
I found a solution using some css workarounds.
<?php if ( (!$wp_query->current_post == 1 && is_home() && !is_paged()) || (!$wp_query->current_post == 1 && is_category() && !is_paged()) ) : ?> <article class="teaser" id="first"> <div class="thumbnail" id="first-thumbnail"><a href="<?php the_permalink(); ?>"> <?php the_post_thumbnail('first-thumbnail'); ?></a></div> <div class="content-container"> <h2><a href="<?php the_permalink(); ?>" class="title"><?php the_title() ;?></a></h2> <?php if ( has_excerpt() ) { ?> <p class="excerpt-content"> <?php $myExcerpt = get_the_excerpt(); $tags = array("<p>", "</p>"); $myExcerpt = str_replace($tags, "", $myExcerpt); echo $myExcerpt; ?> </p> <?php } else { echo ''; } ?> <div class="metadata"> <!--<a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><i class="fa fa-user"></i><?php the_author(); ?></a>--> <a href="<?php echo get_post_meta($post->ID, 'source', true) ?>" target="_blank"><i class="fa fa-external-link-square"></i><?php echo get_post_meta($post->ID, 'source-name', true) ?></a> <p><i class="fa fa-clock-o"></i><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></p> <!-- Category <?php $categories = get_the_category(); $output = ''; if ($categories) { foreach ($categories as $category) { $output .= '<a href="' . get_category_link($category->term_id) . '">' . '<i class="fa fa-thumb-tack"></i>' . $category->cat_name . '</a>'; } echo trim($output, $separator); } ?> /Category --> <a href="<?php the_permalink(); ?>#comments"><i class="fa fa-comment-o"></i><fb:comments-count href="<?php echo get_permalink($post->ID); ?>"></fb:comments-count> comments</a> </div> </div> </article> <?php elseif (is_single()) : ?> <article class="single"> <h2><?php the_title(); ?></h2> <div id="metadata"> <?php get_template_part('single-metadata', get_post_format()); ?> <?php echo sharing_display(); ?> </div> <div class="single-container"> <?php the_content(); ?> </div> <span id="source">source: <a href="<?php echo get_post_meta($post->ID, 'source', true) ?>" target="_blank" id="source"><?php echo get_post_meta($post->ID, 'source-name', true) ?></a></span> <div class="next"> Up Next:  <?php $next_post = get_next_post(); if (!empty( $next_post )): ?> <a href="<?php echo get_permalink( $next_post->ID ); ?>"><?php echo $next_post->post_title; ?></a> <?php endif; ?> </div> <?php get_template_part('single-sharebar', get_post_format()); ?> <?php related_posts() ?> <div id="comments"><?php echo do_shortcode('[fbcomments]'); ?></div> </article> <?php else : ?> <article class="teaser"> <div class="thumbnail"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('small-thumbnail'); ?></a></div> <div class="content-container"> <h2><a href="<?php the_permalink(); ?>" class="title"><?php the_title() ;?></a></h2> <?php if ( has_excerpt() ) { ?> <p class="excerpt-content"> <?php $myExcerpt = get_the_excerpt(); $tags = array("<p>", "</p>"); $myExcerpt = str_replace($tags, "", $myExcerpt); echo $myExcerpt; ?> </p> <?php } else { echo ''; } ?> <div class="metadata"> <!--<a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>"><i class="fa fa-user"></i><?php the_author(); ?></a>--> <a href="<?php echo get_post_meta($post->ID, 'source', true) ?>" target="_blank"><i class="fa fa-external-link-square"></i><?php echo get_post_meta($post->ID, 'source-name', true) ?></a> <p><i class="fa fa-clock-o"></i><?php echo human_time_diff( get_the_time('U'), current_time('timestamp') ) . ' ago'; ?></p> <!-- Category --> <!--<?php $categories = get_the_category(); $output = ''; if ($categories) { foreach ($categories as $category) { $output .= '<a href="' . get_category_link($category->term_id) . '">' . '<i class="fa fa-thumb-tack"></i>' . $category->cat_name . '</a>'; } echo trim($output, $separator); } ?> <!-- /Category --> <a href="<?php the_permalink(); ?>#comments"><i class="fa fa-comment-o"></i><fb:comments-count href="<?php echo get_permalink($post->ID); ?>"></fb:comments-count> comments</a> </div> </div> </article> <?php endif; ?>my theme uses content.php but when I delete the infinite_scroll_render() function it still doesn’t load the posts.
I tried getting rid of the infninite_scroll_render() function and the post-loop.php file but for some reason nothing changed. It still shows the loading gif but doesn’t load the posts.
If I rename post-loop.php to content-post.php will it load?
my index.php file has this:
<div id="content"> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); get_template_part('content', get_post_format()); endwhile; else: ?> <p id="no-posts">There's nothing here yet :(</p> <?php endif; ?> </div>my functions.php file has this:
// theme support for Jetpack infinite scroll add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'render' => 'infinite_scroll_render', 'footer' => false ) ); // render function for Jetpack infinite scroll that 2010 uses, the later WP themes don't need this function infinite_scroll_render() { get_template_part( 'post-loop' ); }and my post-loop.php has this:
<?php while (have_posts()) : the_post(); ?> <article class="teaser"> (post contents) </article> <?php endwhile; ?>I don’t see anything that I’m doing wrong?
Forum: Plugins
In reply to: [WP Popular Posts] Infinite Scroll?Sorry I meant when you get to the bottom of the list of posts in the widget, instead of choosing the amount of posts to display, if it were possible to have an infinite scroll feature instead.
Forum: Plugins
In reply to: [WP Popular Posts] Custom HTML markup – Thumbnail before Title?Nevermind, I just fixed the issue by adding float: left; to all of the elements in each post. Thanks for the awesome plugin!