Override Category Pages

Hi,

I am using integrity stack with Masonry. I need override styles leading article on the category/archive pages with some adjustment to css. Which files do i need to override?

Is it possible to apply category template style to single page to get limited number of posts let’s say 4.

Thanks

Hi There @funkweb,

Thanks for writing in! There are several ways that you can target your category pages using CSS rules. You can add your custom CSS rules into your X -> Theme Options -> CSS area.

If you’re targeting a specific category page, you can use the category slug. For example, if your category slug is news,

.category-news .entry-header .entry-title a {
    color: red;
}

If you want to target all category pages,

.category .entry-content {
    color: green;
}

Hope that helps.

Hi @mldarshana,

Thanks but I am more thinking to change some PHP stuff, I need only date in post expert, show only 5 posts on the category page. Have one leading article having full width and rest will have Masonry.

I tried to look into file structure but because of Cornertone it is little complex, so was thinking if you can guide which template is responsible for category pages?

Thanks

1 Like

Hi @funkweb,

The category page uses the same template as blog page: x/framework/views/global/_index.php. You need to copy this file to child theme in the same directory.

You have to use the is_category() condition to make sure the changes affect only on category pages.

For more information, please take a look at this:

Hope it helps :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.