• HI there.
    I’ll try to explain myself the best way possible.

    I have this code in my “projects” page.

    <?php while ( have_posts() ) : the_post(); ?>
    	<div <?php post_class(); ?>>
    		<?php if ( ! petal_get_option( 'archive-single-use-page-title', false ) ) : ?>
    			<?php the_title( '<h1>', '</h1>' ); ?>
    		<?php endif; ?>
    		<div class="entry-content">
    			<?php the_content(); ?>
    		</div>
    		<div class="prev-next-item">
    			<?php wp_link_pages( array(
    				'before' => '<nav class="page-nav"><p>' . esc_html__( 'Pages:', 'petal' ),
    				'after'  => '</p></nav>'
    			) ); ?>
    
    			<div class="left-cell">
    				<p class="label"><?php esc_html_e( 'Previous', 'petal' ) ?></p>
    				<?php previous_post_link( '<i class="icon-long-arrow-left"></i> %link ', '%title', false ); ?>
    				<span class="back-to-home">
    					<a href="<?php echo esc_url( home_url('/') ); ?>"><i class="fa fa-th-large"></i></a>
    				</span>
    			</div>
    			<div class="right-cell">
    				<p class="label"><?php esc_html_e( 'Next', 'petal' ) ?></p>
    				<?php next_post_link( '%link <i class="icon-long-arrow-right"></i> ', '%title', false ); ?>
    			</div>
    			<div class="clearfix"></div>
    		</div>
    		<?php comments_template( '/templates/comments.php' ); ?>
    	</div>
    <?php endwhile; ?>

    I didn’t want to see the “next” “previous” feature so I erased that part and left it this way:

    <?php while ( have_posts() ) : the_post(); ?>
    	<div <?php post_class(); ?>>
    		<?php if ( ! petal_get_option( 'archive-single-use-page-title', false ) ) : ?>
    			<?php the_title( '<h1>', '</h1>' ); ?>
    		<?php endif; ?>
    		<div class="entry-content">
    			<?php the_content(); ?>
    		</div>
    		<div class="prev-next-item">
    			<?php wp_link_pages(	
    			 ); ?>
    			<div class="clearfix"></div>
    		</div>
    		<?php comments_template( '/templates/comments.php' ); ?>
    	</div>
    <?php endwhile; ?>
    

    But for my surprise, my page now scrolls by itself, I broke the code!! What can I do?

    If it helps, I’m using a template, it is from this specific page (as you can see the next and previous buttons do appear there, I don’t want them.)

    Thank you!!!!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page scrolling automatically’ is closed to new replies.