Hubi1337
Forum Replies Created
-
Okay, I restored the index.php to its original. Now it’s working but the infinite scroll isn’t.
I’ll try to change some settings and maybe I’ll get closer to the solution somehow.
Thanks again for your effort so far!
Thank you very much so far! I can’t appreciate it enough.
I changed everything, but now the page isn’t loaded at all. I got a mistake somewhere.The code in the functions.php looks like:
// Add support for Jetpack Infinite Scroll add_theme_support( 'infinite-scroll', array( 'container' => 'main', 'type' => 'scroll', 'footer' => false, 'footer_widgets' => false, 'wrapper' => true, 'render' => 'infinite_scroll_render', 'posts_per_page' => 5, ) ); function infinite_scroll_render() { get_template_part( 'post-loop' ); }
The post-loop.php looks like
<?php if (have_posts()) : while (have_posts()) : the_post(); update_post_caches($posts); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a class="title" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="info"> <span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span> <?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span> <?php endif; ?> <?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?> <span class="comments"><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove'), '', __('Comments off', 'inove')); ?></span> <div class="fixed"></div> </div> <div class="content"> <?php the_content(__('Weiterlesen...', 'inove')); ?> <div class="fixed"></div> </div> </div> <?php endwhile;?>
The Index.php is now looking like:
<?php get_header(); ?> <?php $options = get_option('inove_options'); if (function_exists('wp_list_comments')) { add_filter('get_comments_number', 'comment_count', 0); } ?> <?php if ($options['notice'] && $options['notice_content']) : ?> <div class="post" id="notice"> <div class="content"> <?php echo($options['notice_content']); ?> <div class="fixed"></div> </div> </div> <?php endif; ?> <?php get_template_part( 'post-loop' ); ?> <div class="errorbox"> <?php _e('Sorry, no posts matched your criteria.', 'inove'); ?> </div> <?php endif; ?> <div id="pagenavi"> <?php if(function_exists('wp_pagenavi')) : ?> <?php wp_pagenavi() ?> <?php else : ?> <span class="newer"><?php previous_posts_link(__('Newer Entries', 'inove')); ?></span> <span class="older"><?php next_posts_link(__('Older Entries', 'inove')); ?></span> <?php endif; ?> <div class="fixed"></div> </div> <?php get_footer(); ?>
I have to say I’m not that good in coding.
Here’s the content of the index.php
Could you please tell me where’s the part I need to fill into the post-loop.php?<?php get_header(); ?> <?php $options = get_option('inove_options'); if (function_exists('wp_list_comments')) { add_filter('get_comments_number', 'comment_count', 0); } ?> <?php if ($options['notice'] && $options['notice_content']) : ?> <div class="post" id="notice"> <div class="content"> <?php echo($options['notice_content']); ?> <div class="fixed"></div> </div> </div> <?php endif; ?> <?php if (have_posts()) : while (have_posts()) : the_post(); update_post_caches($posts); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a>" rel="bookmark"><?php the_title(); ?></a></h2> <div class="info"> <span class="date"><?php the_time(__('F jS, Y', 'inove')) ?></span> <?php if ($options['author']) : ?><span class="author"><?php the_author_posts_link(); ?></span> <?php endif; ?> <?php edit_post_link(__('Edit', 'inove'), '<span class="editpost">', '</span>'); ?> <span class="comments"><?php comments_popup_link(__('No comments', 'inove'), __('1 comment', 'inove'), __('% comments', 'inove'), '', __('Comments off', 'inove')); ?></span> <div class="fixed"></div> </div> <div class="content"> <?php the_content(__('Weiterlesen...', 'inove')); ?> <div class="fixed"></div> </div> </div> <?php endwhile; else : ?> <div class="errorbox"> <?php _e('Sorry, no posts matched your criteria.', 'inove'); ?> </div> <?php endif; ?> <div id="pagenavi"> <?php if(function_exists('wp_pagenavi')) : ?> <?php wp_pagenavi() ?> <?php else : ?> <span class="newer"><?php previous_posts_link(__('Newer Entries', 'inove')); ?></span> <span class="older"><?php next_posts_link(__('Older Entries', 'inove')); ?></span> <?php endif; ?> <div class="fixed"></div> </div> <?php get_footer(); ?>
I deactivated it but now it’s turned on if you want to take a look again.
Thank you very much for your support so far – I’ll try to change it.