• Resolved zoozoozoo

    (@zoozoozoo)


    Hi,
    it seems that the changed ‘tc_content_width’ hook has no effect on the container size, it still has 1170px.
    This is what I use in my child theme function.php:

    add_filter( ‘tc_content_width’ ,’my_content_width’ );
    function my_content_width(){
    return 820;
    }

    What can be the reaseon?
    I appreciate any help.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter zoozoozoo

    (@zoozoozoo)

    Can anybody help, please?
    I need to reduce my max. content width. I tried a lot of css, but with no success.

    Thanks.

    I think that filter is not handled at the moment.
    I mean, is there but nothing takes care of that value in the rest of the customizr code, if I’m not wrong.
    What you need, is, probably, refer to “.container” class in css (but this will require other php code somewhere else, the class container is used everywhere, and if you change it, you have to force .row to be .row-fluid).
    But depends on what you need to change, you can refer to
    “.container[role=main]” or “#main-wrapper” or “#content”
    different selectors for different needs.
    Without considering media queries.

    Thread Starter zoozoozoo

    (@zoozoozoo)

    Thanks for your quick reply.
    My problem is the span12 width. I have a masonry container with 780px width. When it comes to media queries it already starts to influence the masonry container at 979px (Iguess, due to the margins between masonry to content (span12) container. I like to shrink the masonry gallery not before the window size is smaller than 820px width.

    Yeah but you don’t say where is this masonry .. ? in the #content (most likely)?
    I assume you have a full width layout, so #content is span12..
    what you can do, you can change the “.container” width (and build your own media queries) for that page (using the body class .page-PAGEID), then force the main wrapper class to be row-fluid instead of row (filter tc_column_content_wrapper_classes),
    Or.. mm you can force just the “#content.span12” (always just for that page) to follow your own media queries, but you have to build them.

    Thread Starter zoozoozoo

    (@zoozoozoo)

    OK. I will give it a try.
    But, is there any possibility to set a different span12 width?

    zoozoozoo, don’t know what to say 🙂
    I told you, it’s css, wanna change span12 width? change span12 width:

    .span12 {
    width: /*what value ?*/;
    }

    maybe you’ll need a stronger selector, like I said, #content.span12

    Thread Starter zoozoozoo

    (@zoozoozoo)

    1)
    I’ve set the .span12 in css before, as you explained in post #7. Unfortunetely the container can’t be centered.
    That’s the reason for my question if there is an other possibility to set the max. content width (similar to the add_filter from post#1 – which does not work, atm).

    2)
    Thanks for your posts #3 & #5.
    I did the following in my function.php:

    add_filter('tc_column_content_wrapper_classes', 'my_column_content_wrapper_classes');
    function my_column_content_wrapper_classes($classes){
    return str_replace('row', 'row-fluid', $classes);
    }

    and this in my style.css:

    #main-wrapper,
    .container[role=main],
    #content
    {max-width: 820px; margin: 0 auto;}

    Works great for me. Love this comunity 🙂

    Thank you so much d4z_c0nf.

    Thread Starter zoozoozoo

    (@zoozoozoo)

    Mark this topic as resolved.

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    He can’t, you can though. But I’ve already done it for you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Can not change tc_content_width’ is closed to new replies.