Tried to change # of products displayed, created a problem.
-
I was trying to change how many products are displayed in my category pages (from the standard 12 that are displayed), and I tried the code below (which I found on this site). However, I incorrectly placed it into the wrong .php and now I’ve got a problem.
Before I got it working by correctly placing the code to Theme Functions (functions.php)…I tried to paste the code into the CSS of APPEARANCE>EDITOR>ADMIN-FUNCTIONS.php
When I clicked update, this caused a blank white page with an error along the top. I deleted the code that I pasted in, and clicked to save. However, ANYTIME that I update ANY PAGE, it updates, but doesn’t go back to that page in the admin that I was on, it just stays at a blank white screen. I am using the MYSTILE theme.
Any idea what I “broke” and how to fix it? I added the code into he wrong spot, then removed it, but now I have a problem.
Any help is appreciated!!
Thanks.
add_filter( ‘loop_shop_per_page’, create_function( ‘$cols’, ‘return 12;’ ), 20 );
add_filter(‘loop_shop_columns’, ‘loop_columns’);
if (!function_exists(‘loop_columns’)) {
function loop_columns() {
return 4; // 4 products per row
}
}
- The topic ‘Tried to change # of products displayed, created a problem.’ is closed to new replies.