Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #83069
    Aveesh
    Participant

    Hello,

    I have Catch Themes Pro.

    On a page, I want the fixed width to be 1400px – without affecting other pages that use the template full width no sidebar

    I made a child theme, copied page-fullwidth.php to page-fixed width in my child theme directory (gave description of page fixed width no sidebar) and now want to set the fixed width

    How do I assign it body class or What do i I need to do

    Thanks

    #83072
    Mahesh
    Keymaster

    Hi @Aveesh,

    Please post in your site url.
    I assume you are using Catch Flames Pro. We do not have the file called page-fullwidth.php in Catch Flames Pro.

    For this you can use the Custom CSS and get the specific page’s body class and change the width of the the content with-in that very class.

    Or you can also add the desired body class by hooking a function into the body_class filter as follow:

    add_filter( 'body_class', 'catchflames_child_more_body_classes' );
    function catchflames_child_more_body_classes( $class ) {
        $class[] = 'fixed-width-page';
        return $class;
    }

    Note: Add the above code in child theme’s functions.php.

    Regards,
    Mahesh

    #83073
    Aveesh
    Participant

    Hello Mahesh,

    I am using Catch Box Pro v 4.3.2

    and I am trying to modify page – http://www.jordanlesa.org/jobs/job-roster/

    Using the Full width – no sidebar page template – it does NOT fill the width of the screen. I want it use the full width – which on my desktop is about 1600 px – but at least 1400 px (I understand this might look wierd on the mobile screen) or better would be to specify this width on non-mobile screen and have a scroll bar else

    so I have made a child theme based on page-full-width.php from the catch-box-pro theme directory in my catch-box-pro-child theme directory and am wondering what to do next

    From your email the function, how do i use the function (which I asssume is in funcions.php)
    =====================
    add_filter( 'body_class', 'catchflames_child_more_body_classes' );
    function catchflames_child_more_body_classes( $class ) {
    $class[] = 'fixed-width-page';
    return $class;
    }
    =====================
    So if I add a body class called full-fixed-width using the above function – how do i specify on the page template – I dont see anything similar in page-fullwidth.php

    Thanks

    #83079
    Mahesh
    Keymaster

    Hi @Aveesh,

    If you are trying to make the content’s width to 1400px just for one page, I recommend you to use the Custom CSS instead. Like the code below:

    .page-id-630 .site{
        width: 1400px;
    }

    It will only make the site’s width to 1400px which is not enough, you have to also change the width of the inner contents per the new width and manage for responsive views too. I recommend you to hire a customizer.

    If you prefer to use the function as in the above code, edit your function as below:
    add_filter( ‘body_class’, ‘catchflames_child_more_body_classes’ );
    function catchflames_child_more_body_classes( $class ) {
    if ( is_page( 630 ) ) {
    $class[] = ‘fixed-width-page’;
    }
    return $class;
    }

    The above function will add “fixed-width-page” to body for that particular page only.

    Regards,
    Mahesh

    #83080
    Aveesh
    Participant

    Thanks Mahesh,

    I didnt realize that page-id-# is also a a class I can use

    That worked beautifully

    Why doesnt usage of the full width no side bar template result is the FULL WIDTH by default – my screen is 1920 px wide

    Thanks

    #83081
    Mahesh
    Keymaster

    Hi @Aveesh,

    Catch Box Pro is a theme with boxed layout, the full-width for the page for all layout is 1000px whether the layout is full-with no sidebar or with sidebars.

    Regards,
    Mahesh

    #88345
    oleviolin
    Participant

    Hi,
    We just bought 2 copies of catch-flames pro for two different sites.

    We have seen that using
    fixed-width
    or the
    .page-id-1555 .site{
    width: 1900px;
    }

    -option (as recommended above)
    turns off the responsiveness in a somewhat counteproductive way, since the left margin moves to the right as the window-width shrinks, making the content gradually disapear to the right.
    We are using a self made template on the page (which is a copy of the default index.php, but adding some for the application required javascript to that page)

    The question:

    How can we adjust the maximum width of full-width of a fullwidth page. Which today for a 1920px screen amounts to something around 1267px, and still keep the page responsive?

    best regards
    oleviolin

    #88391
    Mahesh
    Keymaster

    @oleviolin: Can you please clarify more. And please post in your site url.

    Regards,
    Mahesh

Viewing 8 posts - 1 through 8 (of 8 total)
  • The topic ‘How to set Fixed width on page’ is closed to new replies.