- This topic has 5 replies, 2 voices, and was last updated 5 years, 8 months ago by Tom.
-
AuthorPosts
-
August 26, 2018 at 7:58 am #660394Benedikt
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=0ATM I’m developing locally, so I can’t provide a link.
Thanks for any help!
August 26, 2018 at 9:29 am #660449TomLead DeveloperLead DeveloperHi there,
The footer shouldn’t be inside the content container by default.
Are you adding new containers inside hooks?
Let me know 🙂
August 26, 2018 at 12:20 pm #660550BenediktHey 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; ?>
August 26, 2018 at 8:11 pm #660726TomLead DeveloperLead DeveloperHmm, 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.
August 27, 2018 at 12:41 am #660848BenediktOkay, 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 🙂
August 27, 2018 at 10:09 am #661342TomLead DeveloperLead DeveloperSounds good!
Thank you 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.