Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jeroen Sormani

    (@sormano)

    Hi Codebloo,

    Thanks for you question!

    You can set the number of columns on your homepage with the following peace of code:

    if ( get_option( 'page_on_front' ) == 4 ) :
    	add_filter( 'loop_shop_columns', create_function( $cols = '', 'return 6;' ) );
    endif;

    You do need to change the ‘4’ with the page id of your home page (you can find this in your address bar when you’re editing the home page).

    Let me know if this helps!

    Thanks!

    Jeroen

    Thread Starter codebloo

    (@codebloo)

    Works! Thank you!

    Thread Starter codebloo

    (@codebloo)

    Whoops spoke too soon .Does not work.
    Homepage still shows items in rows of 4.

    Plugin Author Jeroen Sormani

    (@sormano)

    Bummer!

    Can you try this (forgot to put priority higher)

    if ( get_option( 'page_on_front' ) == 4 ) :
    	add_filter( 'loop_shop_columns', create_function( $cols = '', 'return 6;' ), 20 );
    endif;

    If that doesn’t work, could you contact me through my website?

    Let me know!

    Thanks!

    Jeroen

    Thread Starter codebloo

    (@codebloo)

    Great, that did it, thanks.
    Incidentally it also seems to work without the IF statement and just

    add_filter( 'loop_shop_columns', create_function( $cols = '', 'return 6;' ), 20 );

    although I’m not sure why .

    Plugin Author Jeroen Sormani

    (@sormano)

    Sweet!

    Don’t your product pages show 6 columns when using without the IF statement?

    (they should ?? )

    Thread Starter codebloo

    (@codebloo)

    Yeah it does, but what I’m saying is that without the IF it shows 6 and 4, with the IF it shows 6 across the board!

    Plugin Author Jeroen Sormani

    (@sormano)

    Not 100% sure I get what you mean.

    Is it right now? or are some columns incorrect

    You should use the IF statement to make sure only your homepage is showing 6 columns.

    Thanks!

    Jeroen

    Thread Starter codebloo

    (@codebloo)

    Sorry I was writing a train of thought that I realise wsn’t clear.

    No If statement – WORKS perfectly (6 on hom, 4 on categories).
    If Statement – puts 6 columns on all pages.

    Plugin Author Jeroen Sormani

    (@sormano)

    Huh? okee…

    doesn’t make sense for me know (that it works like that) but I haven’t seen the code & stuff so can’t jump to conclusions.

    But sweet that it works! I can put the topic to resolved?

    Thanks! Jeroen

    Thread Starter codebloo

    (@codebloo)

    Yeah I dont know why either, but glad it’s sorted! Set as resolved!

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Changing columns on home page as well as category’ is closed to new replies.