[Support request] Strange container Behaviour … or am I missing something?

Home Forums Support [Support request] Strange container Behaviour … or am I missing something?

Home Forums Support Strange container Behaviour … or am I missing something?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #660394
    Benedikt

    Hey guys!

    I’m just building a site with GP pro and over the course of the development, I upgraded to 1.7. After I found out the changes about Hooks n stuff (which I really dig so far) I wanted to have clear data, so I wiped the GP installation and started from scratch (resetting all of GP from the GP panel).
    But … I’m having a hard time to configure the footer correctly. I want it to have a darker, full width bg color than the content, so I set the footer to full width while setting its inner to contained. But it seems that the footer is still inside the content area (div id=”content”) which has a 960px width. How do I set the footer to full width while maintaining the 960px of the content (preferably without code)? I tried setting the whole content to full width and injecting a grid-container class div before the main content. But that setting seems to ignore the spacing settings and I’m not all too keen on fixing them via CSS by hand.

    Here I uploaded two screenshots of the states:
    https://www.dropbox.com/sh/cxa175a0flfvqth/AACjCeaqfMrGAAypFPx2gWz_a?dl=0

    ATM I’m developing locally, so I can’t provide a link.

    Thanks for any help!

    #660449
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    The footer shouldn’t be inside the content container by default.

    Are you adding new containers inside hooks?

    Let me know 🙂

    #660550
    Benedikt

    Hey Tom!
    Thank you for your reply!
    And yay, that indeed did the trick! I had a hook outputting an ACF relationship field ‘after_main_container’. I changed it to ‘after_content’ and it fixed the problem. Thank you very much! It now seems to not use the default theme’s paddings, but I’ll just fix that with an extra class.

    Thank you very much!

    But for the future: Would there be a better way to inject such kind of thing inside the container (without breaking it)?

    Bene

    Here’s the code of the hook:

    <?php 
    
    $posts = get_field('weiterfuhrende_seiten_auswahlen');
    
    if( $posts ): ?>
    <div class="grid-container">
    	<?php foreach( $posts as $p ): // variable must NOT be called $post (IMPORTANT) ?>
    		<div class="inside-article further-read grid-33">
    		    <h2>
    						<a href="<?php echo get_permalink( $p->ID ); ?>"><?php echo get_the_title( $p->ID ); ?></a>
    				</h2>
    				<div class="entry-summary">
    					<p>
    						<?php if ( has_excerpt( $p->ID ) ) :
    						{ echo get_the_excerpt( $p->ID ); }
    						endif; ?>
    					</p>	
    					<p class="read-more">
    						<a href="<?php echo get_permalink( $p->ID ); ?>"><?php esc_html_e( "Read More" , 'generatepress' ); ?></a>
    					</p>
    				</div><!-- entry-summary ->
    		</div><!-- entry-summary ->
    	<?php endforeach; ?>
    </div>
    <?php endif; ?>
    #660726
    Tom
    Lead Developer
    Lead Developer

    Hmm, I don’t see anything obvious in your code.

    I’m afraid I’d need to inspect the issue live on your site to know why that hook wasn’t working.

    #660848
    Benedikt

    Okay, I’ll have to shovel it onto a rel server anyway so I’ll send you a link in the next few days. As always: Thanks for your support!

    Oh, and I <3 GP 🙂

    #661342
    Tom
    Lead Developer
    Lead Developer

    Sounds good!

    Thank you 🙂

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.