Projects by WooThemes
[resolved] Change number of columns using filter not working (4 posts)

  1. digitalisfun
    Posted 2 years ago #


    I just tried to change the number of columns using the suggested code found here (http://docs.woothemes.com/document/change-the-number-of-project-columns-on-archives/) in functions.php of my child theme but it doesn't work.

    add_filter( 'projects_loop_columns', 'jk_projects_columns' );
    function jk_projects_columns( $cols ) {
    	$cols = 3;
    	return $cols;

    I tried copying archive-project and setting the value which works but would prefer to just use the filter. Any idea why the code might not be working?




  2. James Koster
    Plugin Author

    Posted 2 years ago #

    Just tested this and can confirm it works. What them are you using? Can I see a URL?

  3. digitalisfun
    Posted 2 years ago #

    Thanks for checking it out James. I am using the latest version of Canvas with a child theme. The URL is private as the site is under development. I just tried removing all code from my functions.php except the above snippet with no luck. Bit stumped :)

  4. digitalisfun
    Posted 2 years ago #

    Had another look at this and this code worked for me:

    add_filter( 'projects_loop_columns', 'gw_woo_custom_projects_loop_columns', 99 );
    function gw_woo_custom_projects_loop_columns( $columns ) {
        $columns = 3;
        return $columns;

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Projects by WooThemes
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic