• Resolved paytong24

    (@paytong24)


    Hello, I am completely not a coder.

    I have created custom PHP code containing flexible content and inserted it in Elementor Pro single template with shortcode (via XYZ PHP Code Plugin).

    The content created from my flexible content seemed to be working normally. Especially, everything looked fine in Elementor visual preview.

    However, the last content row always showed up below footer no matter how many rows of content were there. This happened with all there views; Desktop, Tablet, Mobile

    There is also a problem with wordpress wordpress admin nav menu showing up under post title (dynamic field from elementor pro) in mobile view too.

    The problem seems to be with the custom PHP code created by me. As a non-coder, it is very hard to find the solution myself.

    Here is the code I created (and inserted it with using shortcode).

    <?php if ( have_rows( 'pokemon_level_up' ) ): ?>
    	<?php while ( have_rows( 'pokemon_level_up' ) ) : the_row(); ?>
    		<?php if ( get_row_layout() == 'pokemon_level_information' ) : ?>
    			
    			<table>
    				<caption><?php the_sub_field( 'pokemon_move_level' ); ?></caption>
    				<thead>
    					<tr>
    						<th scope="col">???</th>
    						<th scope="col">???????</th>
    						<th scope="col">PP</th>
    						<th scope="col">????????</th>
    					</tr>
    				</thead>	
    
    			<?php elseif ( get_row_layout() == 'pokemon_move_information_auto' ) : 
    			
    			    $move_id = get_sub_field('pokemon_select_move');
    			    ?>
    
                            <tbody>
    							<tr>
    								<td data-label="???"><?php echo '<a href="'.get_permalink( $move_id ).'">'.get_the_title( $move_id ).'</a>'; ?></td>
    								<td data-label="???????"><?php the_field( 'pokemon_move_power', $move_id); ?></td>
    								<td data-label="PP"><?php the_field( 'pokemon_move_pp', $move_id); ?></td>
    								<td data-label="????????"><?php the_field( 'pokemon_move_description', $move_id); ?></td>
    							</tr>
    			
    		<?php endif; ?>
    	<?php endwhile; ?>
    <?php else: ?>
    	<?php // no layouts found ?>
    <?php endif; ?>

    original code
    https://codepen.io/AllThingsSmitty/pen/MyqmdM

    I woould be much appreciated if you could help me fix the code.

    Thanks in advance!

    • This topic was modified 5 years, 1 month ago by paytong24.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘The last flexible content row always showing up below footer’ is closed to new replies.