[Resolved] Different layouts to post and pages

Home Forums Support [Resolved] Different layouts to post and pages

Home Forums Support Different layouts to post and pages

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #291992
    Joan

    Hello, this theme is awesome and there a lot of documentation here, i tried to search but i don’t found.

    Sorry for my english, i will try to explain my problem.

    I want have different settings to post pages and content pages.

    I want for my normal page this style settings:
    http://grupodais.com/wp-content/uploads/2017/03/iwantnormalpages.png

    I don’t want happens that in my normal page: (this happens when i setup how i want my postpages)
    http://grupodais.com/wp-content/uploads/2017/03/idontwantnormalpages.png

    I want for my postpage this style:
    http://grupodais.com/wp-content/uploads/2017/03/iwantblogpages.png

    I don’t know if i explain me well,

    what i ask is possible?

    thanks!

    #292183
    Leo
    Staff
    Customer Support

    Hi Joan,

    Can you set the setting to One Container and try this function here?

    add_filter( 'body_class', 'joan_body_class', 100, 2 );
    function joan_body_class( $wp_classes, $extra_classes )
    {
    	$wp_classes[] = 'one-container';
    	if ( is_home() ) {
    		$wp_classes = array_diff( $wp_classes, array( 'one-container' ) );
    	} else {
    		$wp_classes = array_diff( $wp_classes, array( 'separate-containers' ) );
    	}
    
        // Add the extra classes back untouched
        return array_merge( $wp_classes, (array) $extra_classes );
    }

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Let me know.

    #292258
    Joan

    Hi! thanks for respond the same day!

    when i put this code, and set the setting to one container don’t happen nothing,

    but when i put this code and set separate containers, in the normal pages change to diferent containers but in the post pages it’s the same in one container,

    i want separate containers to posts pages and same cotainer to normal pages,

    thanks!

    #292286
    Leo
    Staff
    Customer Support

    Edited the code above.

    Can you set it to Separate Container and give it another shot?

    Let me know ๐Ÿ™‚

    #292788
    Joan

    Thanks that perfect!

    Now with set SEPARATECONTAINERS and the code above i have ONECONTAINER to normal pages and SEPARATECONTAINERS on the post pages, exactly what i want!

    But now, how can i give diferrent paddings on normal pages and post pages? sorry but i’m beginner editing wordpress!

    thanks!

    #292819
    Joan
    #292822
    Leo
    Staff
    Customer Support

    Glad you found the post ๐Ÿ™‚

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.