Add category title on homepage

Hi there,

I’m using the Sydney theme and I’m having a little issue on my homepage: I’d like to show a category title (or just text in the style of category-title) above my grid on the homepage. My homepage shows my latest entries (in a grid) but I’d like to also add a title between header slider and grid - just the same way I have it on specific category pages. Any suggestions?

Thanks in advance
Chris

Hello Chris,

I would be glad to help you, but can you please provide a link to your website in order to let me check it?

Kind Regards, Roman.
aThemes Support

Hi Roman,

sure - here it is: www.dietiefe.com

You’ ll see, I added a category title via this CSS code on the homepage, but font size and distance to slider and grid are not the same as on other category pages, and the’re especially different on mobile…

.home div#primary::before {
    content: 'Hauptartikel';
	font-family: 'Roboto', sans-serif;
	color: #000000;	
	font-size: 22px;
	font-weight: bold;
	margin-left: 15px;
	position: relative;
	top: -20px;
	}

.home .masonry-layout {margin-top: 5%;
	}

Thank you for looking into it.

Christoph

Hello Christoph, thank you for the link.

Try to use this CSS code instead of what you’ve mentioned above:

body.home div#primary::before {
  content: 'Hauptartikel';
  font-family: "Raleway", sans-serif;
  line-height: 1.1;
  color: #443f3f;	
  font-size: 32px;
  font-weight: 600;
  margin: 10px 0 20px 15px;
  display: block;
}

@media (max-width: 780px) {
  body.home div#primary::before {
    font-size: 22px;
    margin-bottom: 33px
  }
}

Please feel free to ask any other questions that you might have.

Kind Regards, Roman.
aThemes Support

Awesome! Worked perfectly! Many thanks, Roman! :slight_smile:

You are welcome! :slight_smile:

Kind Regards, Roman.
aThemes Support