[Resolved] Custom post layout problem

Home Forums Support [Resolved] Custom post layout problem

Home Forums Support Custom post layout problem

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #586464
    Hans

    Hi,

    this image shows the problem I am trying to solve.

    http://huppenbroich.de/spd-simmerath/wp-content/uploads/2018/05/problem-area.png

    The content area should have the same distance from the window on all sides. This is true for all posts and pages except those of post type “mitglieder”.

    This is the code for single-mitglieder.php:

    <?php
    /**
     * The template for displaying all single posts.
     *
     * @package Generatepress
     */
    
    get_header(); ?>
    
    <!-- Hans Keutgen: Neue Datei für Theme - Mitglieder behandeln -->
    
    	<div id="primary" <?php generate_content_class();?>>
    		<main id="main" <?php generate_main_class(); ?>>
    		<?php do_action('generate_before_main_content'); ?>
    		<?php while ( have_posts() ) : the_post(); ?>
    
    			<?php get_template_part( 'content', 'single' ); ?>
    			
    			<br>
    						
    <!--			<?php the_post_navigation(); ?> -->
    
    			<?php
    				// If comments are open or we have at least one comment, load up the comment template
    				if ( comments_open() || get_comments_number() ) :
    					comments_template();
    				endif;
    			?>
    
    		<?php endwhile; // end of the loop. ?>
    
    		</main><!-- #main -->
    	</div><!-- #primary -->
    
    <?php 
    do_action('generate_sidebars');
    get_footer();
    

    The URL of post being wrong is in the “Your Website URL”. What is wrong? The code or the CSS?

    GP Premium 1.6.2
    #586717
    Leo
    Staff
    Customer Support

    Hi there,

    Try this CSS:

    .separate-containers .site-main > * {
        margin-bottom: 0;
    }

    Then it looks like you have an extra <br> in the HTML that’s causing the extra space:
    http://www.screencast.com/t/1wIKzxGFFnd

    #586735
    Hans

    Thanks, deleting the

    br

    solved the problem!

    #587171
    Leo
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.