Posts in Specific Category no margin?

Hi,

I would like to remove the outside margin(see orange in screenshot) posts in a specific category, in my case “projects”.

I do know how to do this for ALL posts, but I only want to do this for posts in specific category.

I did find this bit of code, but it doesn’t seem to get rid of the outside margin, and limit on site width to 1200px:

// Make Posts in Category fullwidth
function make_post_fullwidth($layout) {  
   if(is_singular() || is_search() || is_category('projects') || is_tag()) {
       $layout = "full-width";
   }
  return $layout;
}

add_filter('x_option_x_layout_content', 'make_post_fullwidth',999);

Thanks!

Hi Andrew,

Thank you for writing in, please keep in mind that we do not really provide support for customization.

I think you can acheive what you need with a CSS. On every posts that you don’t want the max container (you refer as margin), apply a class nomax-container.

Then add this to Theme Options > CSS

body.nomax-container .x-container.max {
	width: 100%;
	max-width: none;
}

Hope it helps,
Cheers!

awesome, thanks! learning something new with every project… :slight_smile:

You’re welcome!
We’re glad @Friech were able to help you out.

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