Your cart is currently empty!
Hey Wes, in addition to my findings above, I *just* realized why there is a space between the two widgets.
I noticed that the space between the widgets is the same size as the header. Therefore…
Just like the post, the relative “margin top” of the widget is from the top of the page (so the first widget also has a space, but it is filled by the header itself). The second widget has a top margin relative to the bottom of the first widget.
So I think I figured out what’s going on with the posts and the widgets, but I have no idea how to fix them!
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
It still does not work, but it reveals more of where the adjustment may need to be.
Adjusting the margin-top changes the margin (“the space”) from relative to the top of the page to relative to just under the after header widget. In other words, without the widget the relative position is above the header – it does not see the header – but when adding the widget it adds the space of the header and the widget. That’s why your test worked. We can fix this if we can somehow change the relative (default) position to below the header. On a side note, this explains another problem that I have experienced when trying to link to a position within a post (the top of my paragraph get’s cut off).
Noting that I want to use the widget sometimes (for say a promotion), the relative position needs to be consistent.
I set the margin-top to 10px. Here’s what it looks like with the widget (looks good):
Then I remove the widget, and this is what it looks like (top is cut off):
To add another twist to the mystery, when I add the second after header widget (still with the margin-top set to 10px), a space appears between the two widgets. You can see that here:
What are your thoughts?
Learn to Make Money Online
http://ScottsMoneyMachines.com
And here’s the code from the functions file for both widgets:
add_action( 'genesis_after_header', 'after_header_widget', 11 );
/**
* Hooks in after Header Widget Area.
*
*/
function after_header_widget() {
genesis_widget_area(
'after-header-widget',
array(
'before' => '<div class="after-header-widget"><div class="wrap">',
'after' => '</div></div>',
)
);
}
genesis_register_sidebar( array(
'id' => 'after-header-widget',
'name' => __( 'After Header Post & Page 1', 'aspire' ),
'description' => __( 'This is the After Header Widget 1.', 'aspire' ),
) );
add_action( 'genesis_after_header', 'after_header_widget_2', 11 );
/**
* Hooks in after Header Widget Area.
*
*/
function after_header_widget_2() {
genesis_widget_area(
'after-header-widget-2',
array(
'before' => '<div class="after-header-widget"><div class="wrap">',
'after' => '</div></div>',
)
);
}
genesis_register_sidebar( array(
'id' => 'after-header-widget-2',
'name' => __( 'After Header Post & Page 2', 'aspire' ),
'description' => __( 'This is the After Header Widget 2.', 'aspire' ),
) );
Learn to Make Money Online
http://ScottsMoneyMachines.com
Ok Wes, here’s the results:
Still Same Issue With Space
Changing the margin-top in .site-inner did not have any affect. I tried small numbers, large numbers, clearing my cache, etc. I made the changes directly in the CSS.
The Two Back To Back Widgets Partly Work
The two widgets have a large space between them, leading me to believe that the (above) space issue is somehow related to the widget, not the page/post. Here’s an image:
Both widgets take on the same background color… the color of the first widget. You can see that in the image above. I’m not sure what I am doing wrong. Here’s the CSS code:
Learn to Make Money Online
http://ScottsMoneyMachines.com
Hi Wes, Just checking back. I am unable to do anything with that banner due to the huge space between the banner and the post title. How can I remove that?
Thanks.
-Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
This is brilliant Wes! I’ve been playing around with it and there’s so much I can do!
There’s a few things I’m afraid to try because I don’t want to crash my site.
1) How do I reduce the huge space between the widget and the post title?
2) How can I make a similar widget for the home page?
3) How can I create two widgets so I can stack them with different color backgrounds? (this is the one I’m really afraid to play with).
Thanks Wes,
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
Hi Wes,
I logged in to ask the same question that Tre asked (what are the odds?).
I’d like to add a full width banner (image & text) under the nav bar at the top of pages and posts.
Thanks!
Scott
https://scottsmoneymachines.com/
Learn to Make Money Online
http://ScottsMoneyMachines.com
Hey Wes,
I just realized that it is working now in Chrome! And it looks great!!
I must have NOT properly cleared the cache before.
Thank you!
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
Yes Wes, that is how I want it to look. I tried it again, and it still did not work. Turns out that it does not seem to work in Chrome (which I am using), but it does work in Firefox and in IE. Would you know why that is happening? I did clear the browser cache.
Learn to Make Money Online
http://ScottsMoneyMachines.com
Hi Wes,
I did not get it to work.
I made the change in the theme files directly, the only change being the font weight from 300 to 600. It does not seem to make any difference. I tried it at 900 as well.
Although my intention is to bold the titles, I tested it with an H1 inside the post also, just to see if it works. Still, no difference. Of course I can bold the H1 text inside the post if I choose to, but I have no way to bold the title in the editor. Is there anything else I can try? I changed the weight back to 300 for now.
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
Wes, thank you for replying… I somehow did not see the notification in March.
Yes, that is my link. I want to adjust the content area itself (I have been systematically removing the sidebar from my posts). Because of screen size, I’d like the width to remain full for mobile devices.
Thanks!
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
I have been trying to figure this out. I made some progress, but did not find a solution yet. Just sharing where I am so far.
The code below DOES set the page width when I adjust the max-width to a percentage, but it includes all pages (home, posts, etc.).
I want to leave the home page at full width, and be sure any changes I make do not affect mobile devices.
[stylesheet code lines 645-650]
.site-inner,
.wrap {
float: none;
margin: 0 auto;
max-width: 1200px;
}
Learn to Make Money Online
http://ScottsMoneyMachines.com
Hey Jonathan,
I’m not sure if I have your answer, but here’s what I’ve done that works. I use an image size of 1132 x 269 and made note of it for my future use. I’m not sure how I landed on those dimensions, but it seems to work everywhere.
I use Photoshop, so it’s easy (for me) to change the pixel dimensions of an image. Also, if do try this, then be sure to keep your image the same proportions. That means you can change your width to 1132 and the height will become 226. You can then increase the height of the canvas of your image to 269. The end result will be an image that is 1132 x 269 with the same proportions as your original (because we added space vertically). The Aspire theme uses a black header background, so make sure the additional space is transparent and save as a PNG.
I hope this helps you. This is what it looks like on my site: https://scottsmoneymachines.com/
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
Hey Wes,
Sorry for the delay… I think I forgot to click “notify me” and just saw your response.
I signed up for the affiliate program, and it is pending approval.
Thank you,
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
Thanks Wes. I was unable to get the widget set up because I do not know what my widget area ID is. I am technical enough to add the code and figure out some things, but I’ve been struggling trying to figure out how to find or make a widget area ID.
I am not sure, but I am assuming the widget area ID is the name of the widget, which I expect would show up under “Appearance > Widgets” as an available widget once I create/define it.
Can you shed some light on this?
Thanks,
Scott
—- These are the instructions you sent me to —-
Example 2: add an extra widget area above the site header. Just replace before-header with your widget area ID.
<?php
// Paste the code BELOW this line into your child theme functions.
/**
* Add a widget area before the site header with Genesis
*
* @author Reasons to Use Genesis
* @link http://reasonstousegenesis.com/before-header/
*/
add_action( ‘genesis_before_header’, ‘rtug_before_header_widget_area’ );
function rtug_before_header_widget_area() {
genesis_widget_area( ‘before-header’ ); // replace before-header with your widget area ID
}
Learn to Make Money Online
http://ScottsMoneyMachines.com
I logged in today to ask this same question
Specifically, I would like to determine the background and text colors and make it clickable. I am fine putting the fixed content above the header, but below works too since I am not using widget 1.
Here is my link so you can see what I have done so far: https://scottsmoneymachines.com/
Thanks!
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
Thank you Wes. I made several adjustments to my liking, it was quite helpful to know where the code is located. I am still having trouble with the background color though.
I did change the default color with the Customizer for all the default things that I wanted to change. I’d like, however, to have this widget background set to a different color. None of the css changes have any effect… I think the Customizer color choice is overriding it. Is there anything I can do to make this change?
Thanks,
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com
Thanks for checking in Wes, that’s awesome!
As of now I did not get it working, but I will revisit this feature at some point. If you, or anyone reading this post, does find or know the code, this image shows what I am trying to do (search with the magnifying glass icon):
Learn to Make Money Online
http://ScottsMoneyMachines.com
Thanks Wes. It works, but not the way I want. I’ll do some research to see if I can modify the code.
Scott
Learn to Make Money Online
http://ScottsMoneyMachines.com