Wordpress-Loop: PHP-code is not working -
i'm struggling making wordpress-loop working properly. guess error in if-request. please debug , optimize these few lines of php? i'm interested in learning proper coding don't hesitate give me further advices! ;-) amazing! best, enjoy weekend!!!
<?php ?> <?php get_header(); ?> <!-- start body --> <body <?php body_class(); ?>> <!-- hier geht der wrapper auf--> <div class="wrapper"> <!-- logo --> <?php get_template_part( 'logo' ); ?> <div class="clear"></div> <!-- wordpress verbieten, <p>-tags zu setzen --> <?php remove_filter ('the_content', 'wpautop'); ?> <!-- t h e l o o p --> <?php if ( have_posts() ): ?> <?php while ( have_posts() ) : the_post(); ?> <div class="article-content" id="post-<?php the_id(); ?>"> <div class="article-thumb"> <?php the_content(); ?> <div class="theid"><?php the_id(); ?></div> <?php if (in_category( "28" )){ echo '<a href="'; echo '#'; echo '" target="_blank"> link</a>'; } else { echo 'hi!'; ?> <!-- close article-thumb --> </div> <!-- close article-content --> </div> <?php endwhile; ?> <?php endif; ?> <!-- /t h e l o o p --> <!-- clear --> <div class="clear"></div> <?php else: ?> <h2>no posts display</h2> <?php endif; ?> <?php wp_reset_query(); ?> <!-- bottomnav --> <div class="bottomnav"><a class="super next"><?php posts_nav_link(' / ','zurück','weitere projekte'); ?></a></div> <!-- infinite scroll --> <script type="text/javascript"> $('.wrapper').infinitescroll({ loading: { finished: undefined, finishedmsg: "end.", img: "http://www.injuvik.de/wp-content/themes/injuvik/img/pfeilnachunten.png", msg: null, msgtext: "loading..", selector: null, speed: 'fast', start: undefined }, navselector: "div.bottomnav", nextselector: "div.bottomnav a:last", itemselector: "div.wrapper div.article-content", animate: false }); </script> </div> <!-- toggle class on click --> <script> $('body').on('click', 'div.article-content', function(){ $( ).toggleclass( "bigger" ); }); </script> <?php get_footer(); ?>
try add end of code
<?php endif; ?>
also change:
echo 'hi!'; } />
to
echo 'hi!'; } ?>
Comments
Post a Comment