• I’m close to getting static content added where I want it on my front page, but I don’t seem to have the right placement selector. This code should work according to an alternate troubleshooting post I read. I can make this content appear if I use a sticky post and alter the code to appear before a sticky, but not if I do it this way (I don’t want to use sticky posts). Need help, thanks!

    body.blog main::before {
    	content: "text";
    	display: block;
    	padding-bottom: 25px;
    	font-family: H5;
    }

    Also, how come choosing H5 as font family doesn’t make the content show up as my current theme’s header 5? I would like to make it come out as header 5.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Can you please add a link to your site?

    H5 doesn’t work because you can’t use an element type for font-family. Font family is something like Times Roman or Arial. If you want the content to look like your H5 tags, then you need to add in the same properties and values separatedly that are defined for H5, like the font-family, font-size, font-weight, etc.

    Thread Starter Stephen

    (@snoo223)

    Use this selector instead:
    .home.blog #main-content::before
    You were missing the period before home and you should use #main-content instead of .main.

    As I mentioned earlier, you’ll need to figure out the properties of the H5 element and add them in individually. You can’t use H5 as a font-family.

    Thread Starter Stephen

    (@snoo223)

    Thank you! That selector works just fine. I understand what you’re saying about figuring out the properties of H5, but upon doing research I can’t seem to find any variables for condensing the font to match my headers, save for font-stretch. But apparently it doesn’t work in browsers. Any suggestions for finding an ultra-condensed sans serif?

    .home.blog #main-content::before {
    content: “text”;
    display: block;
    padding-bottom: 25px;
    font-size: 14px;
    font-stretch: ultra-condensed;
    font-family: Helvetica, Arial, sans-serif;
    }

    Your theme uses the Oswald font for headers, so you could try using that instead:

    font-family: Oswald, Helvetica, Arial, sans-serif;

    Helvetica has a condensed version, but I’m not sure exactly how to get it. You could also try a Google search for “ultra condensed sans serif fonts” and see if anything interests you.

    Thread Starter Stephen

    (@snoo223)

    Thank you. All issues resolved.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Adding Static Content Above the Posts on Front Page’ is closed to new replies.